X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fstrings.php;h=9e295df6dfe18fb299a7aa5e93105491596cb626;hp=ddb13b2a0713ab7ac9c6123ab9670df7796d69fb;hb=adc3ea746a7853859d1e17cf60550992ccba011a;hpb=55521a0717830d38714bdc4177fc31df8089f8dc;ds=sidebyside diff --git a/functions/strings.php b/functions/strings.php index ddb13b2a..9e295df6 100644 --- a/functions/strings.php +++ b/functions/strings.php @@ -474,12 +474,7 @@ function get_location () { $is_secure_connection, $sq_ignore_http_x_forwarded_headers; /* Get the path, handle virtual directories */ - if(strpos(php_self(), '?')) { - $path = substr(php_self(), 0, strpos(php_self(), '?')); - } else { - $path = php_self(); - } - $path = substr($path, 0, strrpos($path, '/')); + $path = substr(php_self(FALSE), 0, strrpos(php_self(FALSE), '/')); // proto+host+port are already set in config: if ( !empty($config_location_base) ) {