jenkins-bot has submitted this change and it was merged.
Change subject: Set Geshi version in main php file
......................................................................
Set Geshi version in main php file
The version was set from the ExtensionTypes hook (which runs only on
Special:Version). WikiApiary and other API consumers were unable to
detect the version.
Backported from I836e0df942a066d80255c1b68472e7ee58124357
Bug: T75666
Change-Id: Ic1448730f6f985df5ab0463a0ed57a884787d4ff
---
M SyntaxHighlight_GeSHi.class.php
M SyntaxHighlight_GeSHi.php
2 files changed, 3 insertions(+), 13 deletions(-)
Approvals:
MarkAHershberger: Looks good to me, approved
jenkins-bot: Verified
diff --git a/SyntaxHighlight_GeSHi.class.php b/SyntaxHighlight_GeSHi.class.php
index 6d1f73c..3580d01 100644
--- a/SyntaxHighlight_GeSHi.class.php
+++ b/SyntaxHighlight_GeSHi.class.php
@@ -470,18 +470,6 @@
}
/**
- * Get the GeSHI's version information while Special:Version is read.
- * @param $extensionTypes
- * @return bool
- */
- public static function extensionTypes( &$extensionTypes ) {
- global $wgExtensionCredits;
- self::initialise();
-
$wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi']['version'] =
GESHI_VERSION;
- return true;
- }
-
- /**
* Register a ResourceLoader module providing styles for each supported
language.
*
* @param ResourceLoader $resourceLoader
diff --git a/SyntaxHighlight_GeSHi.php b/SyntaxHighlight_GeSHi.php
index da33ebe..234ac50 100644
--- a/SyntaxHighlight_GeSHi.php
+++ b/SyntaxHighlight_GeSHi.php
@@ -36,12 +36,15 @@
die();
}
+require_once __DIR__ . '/geshi/geshi.php';
+
$wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi'] = array(
'path' => __FILE__,
'name' => 'SyntaxHighlight',
'author' => array( 'Brion Vibber', 'Tim Starling', 'Rob
Church', 'Niklas Laxström' ),
'descriptionmsg' => 'syntaxhighlight-desc',
'url' =>
'https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi',
+ 'version' => GESHI_VERSION,
);
// Change these in LocalSettings.php
@@ -56,7 +59,6 @@
$wgAutoloadClasses['ResourceLoaderGeSHiModule'] = $dir .
'ResourceLoaderGeSHiModule.php';
$wgAutoloadClasses['ResourceLoaderGeSHiLocalModule'] = $dir .
'ResourceLoaderGeSHiLocalModule.php';
-$wgHooks['ExtensionTypes'][] = 'SyntaxHighlight_GeSHi::extensionTypes';
$wgHooks['ResourceLoaderRegisterModules'][] =
'SyntaxHighlight_GeSHi::resourceLoaderRegisterModules';
$wgHooks['ContentGetParserOutput'][] = 'SyntaxHighlight_GeSHi::renderHook';
--
To view, visit https://gerrit.wikimedia.org/r/182853
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic1448730f6f985df5ab0463a0ed57a884787d4ff
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/SyntaxHighlight_GeSHi
Gerrit-Branch: REL1_24
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: MarkAHershberger <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits