Rjain has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/68857


Change subject: changed the way namespaces are checked
......................................................................

changed the way namespaces are checked

Change-Id: If9763dac6bdd5e47edfcacbf4f52c785dc16d206
---
M Annotator.hooks.php
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Annotator 
refs/changes/57/68857/1

diff --git a/Annotator.hooks.php b/Annotator.hooks.php
index 082e83b..0253368 100644
--- a/Annotator.hooks.php
+++ b/Annotator.hooks.php
@@ -7,12 +7,10 @@
 
        */
        public static function onBeforePageDisplay( OutputPage &$output, Skin 
&$skin ) {
-               $Namespace = $skin->getTitle()->getNamespace(); //get the 
namespace number
-               $supportedNamespaces = array( 0, 1, 14 );       //Namespaces 
where the annotator will be called
                /*
                 module is added only when then namespace matches
                */
-               if( in_array($Namespace, $supportedNamespaces) )
+                if($skin->getTitle()->inNamespaces( array( NS_MAIN, NS_TALK, 
NS_CATEGORY)))
                        $output->addModules( 'ext.annotator' );
                return true;            
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/68857
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9763dac6bdd5e47edfcacbf4f52c785dc16d206
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Annotator
Gerrit-Branch: master
Gerrit-Owner: Rjain <richa.jain1...@gmail.com>

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

Reply via email to