From: Jens Frank Date: Sun, 5 Sep 2010 21:54:01 +0000 (+0000) Subject: Firefox interpretes links starting with // as if they would start with http://. If... X-Git-Tag: 1.31.0-rc.0~35127 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=31e26a24015ea79af5aa321f9dbd2b170e00ee62;p=lhc%2Fweb%2Fwiklou.git Firefox interpretes links starting with // as if they would start with . If the wiki is installed in /, we get // as path --- diff --git a/includes/templates/NoLocalSettings.php b/includes/templates/NoLocalSettings.php index 21a6de2966..88510cce49 100644 --- a/includes/templates/NoLocalSettings.php +++ b/includes/templates/NoLocalSettings.php @@ -11,6 +11,7 @@ if ( !isset( $wgVersion ) ) { } $script = $_SERVER['SCRIPT_NAME']; $path = pathinfo( $script, PATHINFO_DIRNAME ) . '/'; +$path = str_replace( '//', '/', $path ); $ext = pathinfo( $script, PATHINFO_EXTENSION ); ?>