SamanthaNguyen has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/387156 )
Change subject: Use ExtensionRegistry to check if extensions are installed
......................................................................
Use ExtensionRegistry to check if extensions are installed
Used to check if Comments or RandomGameUnit is installed.
Change-Id: I89d52fbd2521c9e6fcffa25befb002550c31d3ff
---
M extension.json
M includes/LinkPage.class.php
2 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LinkFilter
refs/changes/56/387156/1
diff --git a/extension.json b/extension.json
index 9876947..388e0ac 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
{
"name": "LinkFilter",
- "version": "3.5.1",
+ "version": "3.5.2",
"author": [
"Aaron Wright",
"David Pean",
diff --git a/includes/LinkPage.class.php b/includes/LinkPage.class.php
index 61fe0c5..74e66a6 100644
--- a/includes/LinkPage.class.php
+++ b/includes/LinkPage.class.php
@@ -78,7 +78,7 @@
$wgOut->addHTML( "<div id=\"categories\">{$cat}</div>"
);
}
- if ( class_exists( 'Comment' ) ) {
+ if ( ExtensionRegistry::getInstance()->isLoaded( 'Comments' ) )
{
$wgOut->addWikiText( '<comments/>' );
}
@@ -323,7 +323,7 @@
return '';
}
- if ( class_exists( 'RandomGameUnit' ) ) {
+ if ( ExtensionRegistry::getInstance()->isLoaded(
'RandomGameUnit' ) ) {
$this->getContext()->getOutput()->addModuleStyles(
'ext.RandomGameUnit.css' );
return RandomGameUnit::getRandomGameUnit();
} else {
--
To view, visit https://gerrit.wikimedia.org/r/387156
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I89d52fbd2521c9e6fcffa25befb002550c31d3ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits