jenkins-bot has submitted this change and it was merged. ( 
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(-)

Approvals:
  Jack Phoenix: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I89d52fbd2521c9e6fcffa25befb002550c31d3ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen <samanthanguyen1...@gmail.com>
Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to