r53726 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53725‎ | r53726 | r53727 >
Date:20:12, 24 July 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Deprecate broken accessor and add a new one
Modified paths:
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPage.php
@@ -703,7 +703,12 @@
704704 * Accessor and mutator
705705 */
706706 function name( $x = NULL ) { return wfSetVar( $this->mName, $x ); }
707 - function restrictions( $x = NULL) { return wfSetVar( $this->mRestrictions, $x ); }
 707+ function restrictions( $x = NULL) {
 708+ # Use the one below this
 709+ wfDeprecated( __METHOD__ );
 710+ return wfSetVar( $this->mRestriction, $x );
 711+ }
 712+ function restriction( $x = NULL) { return wfSetVar( $this->mRestriction, $x ); }
708713 function listed( $x = NULL) { return wfSetVar( $this->mListed, $x ); }
709714 function func( $x = NULL) { return wfSetVar( $this->mFunction, $x ); }
710715 function file( $x = NULL) { return wfSetVar( $this->mFile, $x ); }

Status & tagging log