Merge "make rebuildtextindex script aware of content models."
[lhc/web/wiklou.git] / includes / specials / SpecialVersion.php
index 84107de..01a12c0 100644 (file)
@@ -122,7 +122,7 @@ class SpecialVersion extends SpecialPage {
                        'Alexandre Emsenhuber', 'Siebrand Mazeland', 'Chad Horohoe',
                        'Roan Kattouw', 'Trevor Parscal', 'Bryan Tong Minh', 'Sam Reed',
                        'Victor Vasiliev', 'Rotem Liss', 'Platonides', 'Antoine Musso',
-                       'Timo Tijhof',
+                       'Timo Tijhof', 'Daniel Kinzler', 'Jeroen De Dauw',
                        '[[Special:Version/Credits|' .
                        wfMessage( 'version-poweredby-others' )->text() .
                        ']]'
@@ -263,9 +263,13 @@ class SpecialVersion extends SpecialPage {
         */
        private static function getwgVersionLinked() {
                global $wgVersion;
-               $versionParts = array();
-               preg_match( "/^(\d+\.\d+)/", $wgVersion, $versionParts );
-               return "[https://www.mediawiki.org/wiki/MediaWiki_{$versionParts[1]} $wgVersion]";
+               $versionUrl = "";
+               if( wfRunHooks( 'SpecialVersionVersionUrl', array( $wgVersion, &$versionUrl ) ) ) {
+                       $versionParts = array();
+                       preg_match( "/^(\d+\.\d+)/", $wgVersion, $versionParts );
+                       $versionUrl = "https://www.mediawiki.org/wiki/MediaWiki_{$versionParts[1]}";
+               }
+               return "[$versionUrl $wgVersion]";
        }
 
        /**
@@ -771,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' ),