X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialVersion.php;h=01a12c0f84b1d7c7a3e7ba0b175434025f6c720c;hb=587626d03a1840ecc657a6106a9dbf7ae376bd28;hp=7ace5f8de9c11c95f56048188fa04d16279ce1b7;hpb=ec81140f9b8edcd25410bc5e5835c634843d36dc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 7ace5f8de9..01a12c0f84 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -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' ),