Index: branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | ? array_flip( $params['categories'] ) |
39 | 39 | : false; |
40 | 40 | $this->neededNames = isset( $params['names'] ) |
41 | | - ? array_flip( $params['names'] ) |
| 41 | + ? $params['names'] |
42 | 42 | : false; |
43 | 43 | $this->listAllowed = isset( $params['allowedonly'] ) && $params['allowedonly']; |
44 | 44 | $this->listEnabled = isset( $params['enabledonly'] ) && $params['enabledonly']; |
— | — | @@ -128,8 +128,7 @@ |
129 | 129 | private function isNeeded( Gadget $gadget ) { |
130 | 130 | global $wgUser; |
131 | 131 | |
132 | | - return ( $this->neededNames === false || isset( $this->neededNames[$gadget->getName()] ) ) |
133 | | - && ( !$this->listAllowed || $gadget->isAllowed( $wgUser ) ) |
| 132 | + return ( !$this->listAllowed || $gadget->isAllowed( $wgUser ) ) |
134 | 133 | && ( !$this->listEnabled || $gadget->isEnabled( $wgUser ) ) |
135 | 134 | && ( !$this->listShared || $gadget->isShared() ) |
136 | 135 | && ( !$this->categories || isset( $this->categories[$g->getCategory()] ) ); |