http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95954

Revision: 95954
Author:   catrope
Date:     2011-09-01 09:56:16 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
RL2: Hopefully fix bug Timo reported in list=gadgets: names parameter broken

Modified Paths:
--------------
    branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php

Modified: branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php
===================================================================
--- branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php     2011-09-01 
09:38:10 UTC (rev 95953)
+++ branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php     2011-09-01 
09:56:16 UTC (rev 95954)
@@ -37,7 +37,7 @@
                        ? array_flip( $params['categories'] )
                        : false;
                $this->neededNames = isset( $params['names'] )
-                       ? array_flip( $params['names'] )
+                       ? $params['names']
                        : false;
                $this->listAllowed = isset( $params['allowedonly'] ) && 
$params['allowedonly'];
                $this->listEnabled = isset( $params['enabledonly'] ) && 
$params['enabledonly'];
@@ -128,8 +128,7 @@
        private function isNeeded( Gadget $gadget ) {
                global $wgUser;
 
-               return ( $this->neededNames === false || isset( 
$this->neededNames[$gadget->getName()] ) )
-                       && ( !$this->listAllowed || $gadget->isAllowed( $wgUser 
) )
+               return ( !$this->listAllowed || $gadget->isAllowed( $wgUser ) )
                        && ( !$this->listEnabled || $gadget->isEnabled( $wgUser 
) )
                        && ( !$this->listShared || $gadget->isShared() )
                        && ( !$this->categories || isset( 
$this->categories[$g->getCategory()] ) );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to