r86336 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86335‎ | r86336 | r86337 >
Date:19:03, 18 April 2011
Author:reedy
Status:ok
Tags:
Comment:
Revert avars deprecation in r11308

Swap a couple of name() to getName()
Modified paths:
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)
  • /trunk/phase3/includes/SpecialPageFactory.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPageFactory.php
@@ -457,7 +457,7 @@
458458 $page->including( $including );
459459
460460 // Execute special page
461 - $profName = 'Special:' . $page->name();
 461+ $profName = 'Special:' . $page->getName();
462462 wfProfileIn( $profName );
463463 $page->execute( $par );
464464 wfProfileOut( $profName );
Index: trunk/phase3/includes/SpecialPage.php
@@ -380,20 +380,11 @@
381381 }
382382 }
383383
384 - /**#@+
385 - * Accessor
386 - *
387 - * @deprecated
388 - */
389384 function getName() { return $this->mName; }
390385 function getRestriction() { return $this->mRestriction; }
391386 function getFile() { return $this->mFile; }
392387 function isListed() { return $this->mListed; }
393 - /**#@-*/
394388
395 - /**#@+
396 - * Accessor and mutator
397 - */
398389 function name( $x = null ) { return wfSetVar( $this->mName, $x ); }
399390 function restrictions( $x = null) {
400391 # Use the one below this
@@ -406,7 +397,6 @@
407398 function file( $x = null) { return wfSetVar( $this->mFile, $x ); }
408399 function includable( $x = null ) { return wfSetVar( $this->mIncludable, $x ); }
409400 function including( $x = null ) { return wfSetVar( $this->mIncluding, $x ); }
410 - /**#@-*/
411401
412402 /**
413403 * Get the localised name of the special page
@@ -506,7 +496,7 @@
507497 global $wgContLang;
508498
509499 if( $summaryMessageKey == '' ) {
510 - $msg = $wgContLang->lc( $this->name() ) . '-summary';
 500+ $msg = $wgContLang->lc( $this->getName() ) . '-summary';
511501 } else {
512502 $msg = $summaryMessageKey;
513503 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r11308* Deprecated some accessors in favor of fancy accessors/mutatorsavar03:36, 12 October 2005

Status & tagging log