From e64097ae1d11b5ca4adf67b8bf13f75ae0362782 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Fri, 19 Jul 2013 13:16:25 +0200 Subject: [PATCH] =?UTF-8?q?=C3=A7a=20m'agace=20ce=20truc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 224acb7..084e81e 100755 --- a/index.php +++ b/index.php @@ -82,8 +82,8 @@ 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( $path['dirname'] != '/' ) - $subfolder = $path['dirname'] .'/'; + $finalslash = ( $path['dirname'] != '/' ) ? '/' : ''; + $subfolder = $path['dirname'] . $finalslash; } else $subfolder = ''; return 'http'.($https?'s':'').'://'.$_SERVER["SERVER_NAME"].$serverport.$subfolder; }