r33289 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r33288‎ | r33289 | r33290 >
Date:16:04, 14 April 2008
Author:aaron
Status:old
Tags:
Comment:
Allow string names
Modified paths:
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPage.php
@@ -365,15 +365,16 @@
366366 /**
367367 * Add a page to a certain display group for Special:SpecialPages
368368 *
369 - * @param SpecialPage $page
 369+ * @param mixed $page (SpecialPage or string)
370370 * @param string $group
371371 * @static
372372 */
373 - static function setGroup( &$page, $group ) {
 373+ static function setGroup( $page, $group ) {
374374 if ( !self::$mListInitialised ) {
375375 self::initList();
376376 }
377 - self::$mGroupsList[$page->mName] = $group;
 377+ $name = is_object($page) ? $page->mName : $page;
 378+ self::$mGroupsList[$name] = $group;
378379 }
379380
380381 /**

Status & tagging log