r11308 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11307‎ | r11308 | r11309 >
Date:03:36, 12 October 2005
Author:avar
Status:old
Tags:
Comment:
* Deprecated some accessors in favor of fancy accessors/mutators
Modified paths:
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPage.php
@@ -340,14 +340,29 @@
341341 }
342342 }
343343
344 - # Accessor functions, see the descriptions of the associated variables above
 344+ /**#@+
 345+ * Accessor
 346+ *
 347+ * @deprecated
 348+ */
345349 function getName() { return $this->mName; }
346350 function getRestriction() { return $this->mRestriction; }
 351+ function getFile() { return $this->mFile; }
347352 function isListed() { return $this->mListed; }
348 - function getFile() { return $this->mFile; }
 353+ /**#@-*/
 354+
 355+ /**#@+
 356+ * Accessor and mutator
 357+ */
 358+ function name( $x = NULL ) { return wfSetVar( $this->mName, $x ); }
 359+ function restrictions( $x = NULL) { return wfSetVar( $this->mRestrictions, $x ); }
 360+ function listed( $x = NULL) { return wfSetVar( $this->mListed, $x ); }
 361+ function func( $x = NULL) { return wfSetVar( $this->mFunction, $x ); }
 362+ function file( $x = NULL) { return wfSetVar( $this->mFile, $x ); }
 363+ function includable( $x = NULL ) { return wfSetVar( $this->mIncludable, $x ); }
349364 function including( $x = NULL ) { return wfSetVar( $this->mIncluding, $x ); }
350 - function includable( $x = NULL ) { return wfSetVar( $this->mIncludable, $x ); }
351 -
 365+ /**#@-*/
 366+
352367 /**
353368 * Checks if the given user (identified by an object) can execute this
354369 * special page (as defined by $mRestriction)

Follow-up revisions

RevisionCommit summaryAuthorDate
r86336Revert avars deprecation in r11308...reedy19:03, 18 April 2011

Status & tagging log