r95954 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95953‎ | r95954 | r95955 >
Date:09:56, 1 September 2011
Author:catrope
Status:resolved
Tags:
Comment:
RL2: Hopefully fix bug Timo reported in list=gadgets: names parameter broken
Modified paths:
  • /branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php (modified) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php
@@ -37,7 +37,7 @@
3838 ? array_flip( $params['categories'] )
3939 : false;
4040 $this->neededNames = isset( $params['names'] )
41 - ? array_flip( $params['names'] )
 41+ ? $params['names']
4242 : false;
4343 $this->listAllowed = isset( $params['allowedonly'] ) && $params['allowedonly'];
4444 $this->listEnabled = isset( $params['enabledonly'] ) && $params['enabledonly'];
@@ -128,8 +128,7 @@
129129 private function isNeeded( Gadget $gadget ) {
130130 global $wgUser;
131131
132 - return ( $this->neededNames === false || isset( $this->neededNames[$gadget->getName()] ) )
133 - && ( !$this->listAllowed || $gadget->isAllowed( $wgUser ) )
 132+ return ( !$this->listAllowed || $gadget->isAllowed( $wgUser ) )
134133 && ( !$this->listEnabled || $gadget->isEnabled( $wgUser ) )
135134 && ( !$this->listShared || $gadget->isShared() )
136135 && ( !$this->categories || isset( $this->categories[$g->getCategory()] ) );

Follow-up revisions

RevisionCommit summaryAuthorDate
r95955Follows-up r95954: Fix case &ganames& and &ganames=&. Falsey is not enough, e...krinkle10:05, 1 September 2011

Status & tagging log