(bug 43184) bogus script path in Special:Version
authorkarun <karun.84@gmx.de>
Mon, 17 Dec 2012 22:48:53 +0000 (09:48 +1100)
committerAntoine Musso <hashar@free.fr>
Wed, 19 Dec 2012 15:55:12 +0000 (16:55 +0100)
Corrected display of script path change so that when the script path is
empty, we default to showing / as the path.

Change-Id: I8bb6ff820fa3f8d7c3cdd608f531c0f3c36389ca

includes/specials/SpecialVersion.php

index 0ff5fc9..01a12c0 100644 (file)
@@ -775,15 +775,17 @@ class SpecialVersion extends SpecialPage {
                return $repo->getHeadSHA1();
        }
 
+
        /**
         * Get the list of entry points and their URLs
         * @return string Wikitext
         */
        public function getEntryPointInfo() {
                global $wgArticlePath, $wgScriptPath;
+               $scriptPath = $wgScriptPath ? $wgScriptPath : "/";
                $entryPoints = array(
                        'version-entrypoints-articlepath' => $wgArticlePath,
-                       'version-entrypoints-scriptpath' => $wgScriptPath,
+                       'version-entrypoints-scriptpath' => $scriptPath,
                        'version-entrypoints-index-php' => wfScript( 'index' ),
                        'version-entrypoints-api-php' => wfScript( 'api' ),
                        'version-entrypoints-load-php' => wfScript( 'load' ),