fixing fix

This commit is contained in:
ArthurHoaro 2013-07-19 13:12:54 +02:00
parent ee00246269
commit 2971897bd4

View file

@ -82,7 +82,7 @@ function serverUrl($return_subfolder = false)
$serverport = ($_SERVER["SERVER_PORT"]=='80' || ($https && $_SERVER["SERVER_PORT"]=='443') ? '' : ':'.$_SERVER["SERVER_PORT"]);
if($return_subfolder === true) {
$path = pathinfo( $_SERVER['PHP_SELF'] );
if( !empty( $_SERVER['PHP_SELF'] ))
if( $path['dirname'] != '/' )
$subfolder = $path['dirname'] .'/';
} else $subfolder = '';
return 'http'.($https?'s':'').'://'.$_SERVER["SERVER_NAME"].$serverport.$subfolder;