]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Proxy.php
Logger Levels
[friendica.git] / src / Util / Proxy.php
index bb26185f4656595098ff47f6983badbd09a19d3e..8478ce868af103794aad2ba1c534fc929dff3a57 100644 (file)
@@ -7,8 +7,6 @@ use Friendica\BaseObject;
 use Friendica\Core\Config;
 use Friendica\Core\System;
 
-require_once 'include/security.php';
-
 /**
  * @brief Proxy utilities class
  */
@@ -91,7 +89,7 @@ class Proxy
                $url = html_entity_decode($url, ENT_NOQUOTES, 'utf-8');
 
                // Creating a sub directory to reduce the amount of files in the cache directory
-               $basepath = $a->get_basepath() . '/proxy';
+               $basepath = $a->getBasePath() . '/proxy';
 
                $shortpath = hash('md5', $url);
                $longpath = substr($shortpath, 0, 2);
@@ -180,16 +178,8 @@ class Proxy
        {
                $query = parse_url($url, PHP_URL_QUERY);
                $query = html_entity_decode($query);
-               $query_list = explode('&', $query);
-
-               $arr = [];
-
-               foreach ($query_list as $key_value) {
-                       $key_value_list = explode('=', $key_value);
-                       $arr[$key_value_list[0]] = $key_value_list[1];
-               }
 
-               unset($url, $query_list, $url);
+               parse_str($query, $arr);
 
                return $arr;
        }