r102781 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102780‎ | r102781 | r102782 >
Date:14:04, 11 November 2011
Author:catrope
Status:ok (Comments)
Tags:todo 
Comment:
[RL2] Address the todo in r101347: per an IRC discussion with Krinkle, we don't want to honor enabledByDefault cross-wiki
Modified paths:
  • /branches/RL2/extensions/Gadgets/Gadgets.hooks.php (modified) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/Gadgets.hooks.php
@@ -292,7 +292,8 @@
293293 // TODO the below means source and category IDs can't contain slashes or dashes, enforce this
294294 'section' => "gadgetsshared/gadgetrepo-$repoSource$sectionCat",
295295 'cssclass' => 'mw-gadgets-shared-pref',
296 - //'default' => $gadget->isEnabledForUser( $user ), // TODO: should we honor 'default' for remote gadgets?
 296+ // 'default' isn't in here by design: we don't want
 297+ // enabledByDefault to be honored across wikis
297298 );
298299 }
299300 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101347[RL2] Fix bug where shared gadget preferences weren't saved because 'default'...catrope10:16, 31 October 2011

Comments

#Comment by Krinkle (talk | contribs)   22:41, 13 November 2011

I'm not sure if this affects anything, but I feel this should be enforced a little deeper.

i.e. when creating a gadget object for a foreign gadget, isEnabledByDefault (and subsequently isEnabledForUser) shouldn't return true.

#Comment by Catrope (talk | contribs)   07:15, 14 November 2011

Hmm, right.

Status & tagging log