r80028 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80027‎ | r80028 | r80029 >
Date:18:54, 11 January 2011
Author:reedy
Status:ok
Tags:
Comment:
Add a lot of method comment stubs/placeholders
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuthUser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/CentralAuthUser.php
@@ -521,6 +521,10 @@
522522 return $dbw->affectedRows() != 0;
523523 }
524524
 525+ /**
 526+ * @param array $passwords
 527+ * @return bool
 528+ */
525529 public function storeAndMigrate( $passwords = array() ) {
526530 $dbw = self::getCentralDB();
527531 $dbw->begin();
@@ -823,6 +827,12 @@
824828 return false;
825829 }
826830
 831+ /**
 832+ * @static
 833+ * @throws MWException
 834+ * @param $list
 835+ * @return array
 836+ */
827837 protected static function validateList( $list ) {
828838 $unique = array_unique( $list );
829839 $valid = array_intersect( $unique, self::getWikiList() );
@@ -835,6 +845,10 @@
836846 return $valid;
837847 }
838848
 849+ /**
 850+ * @static
 851+ * @return array
 852+ */
839853 public static function getWikiList() {
840854 global $wgLocalDatabases;
841855 static $wikiList;
@@ -1041,6 +1055,12 @@
10421056 $this->doCrosswikiSuppression( false, $wgUser->getName(), $reason );
10431057 }
10441058
 1059+ /**
 1060+ * @param $suppress
 1061+ * @param $by
 1062+ * @param $reason
 1063+ * @return void
 1064+ */
10451065 protected function doCrosswikiSuppression( $suppress, $by, $reason ) {
10461066 global $wgCentralAuthWikisPerSuppressJob;
10471067 $this->loadAttached();
@@ -1301,6 +1321,9 @@
13021322 return $unattached;
13031323 }
13041324
 1325+ /**
 1326+ * @return array
 1327+ */
13051328 function doListUnattached() {
13061329 $dbw = self::getCentralDB();
13071330
@@ -1322,6 +1345,10 @@
13231346 return $dbs;
13241347 }
13251348
 1349+ /**
 1350+ * @param $wikiID
 1351+ * @return void
 1352+ */
13261353 function addLocalName( $wikiID ) {
13271354 $dbw = self::getCentralDB();
13281355 $this->lazyImportLocalNames();
@@ -1333,6 +1360,10 @@
13341361 array( 'IGNORE' ) );
13351362 }
13361363
 1364+ /**
 1365+ * @param $wikiID
 1366+ * @return void
 1367+ */
13371368 function removeLocalName( $wikiID ) {
13381369 $dbw = self::getCentralDB();
13391370 $this->lazyImportLocalNames();
@@ -1343,6 +1374,9 @@
13441375 __METHOD__ );
13451376 }
13461377
 1378+ /**
 1379+ * @return bool
 1380+ */
13471381 function lazyImportLocalNames() {
13481382 $dbw = self::getCentralDB();
13491383
@@ -1588,16 +1622,26 @@
15891623 return $data;
15901624 }
15911625
 1626+ /**
 1627+ * @return
 1628+ */
15921629 function getEmail() {
15931630 $this->loadState();
15941631 return $this->mEmail;
15951632 }
15961633
 1634+ /**
 1635+ * @return
 1636+ */
15971637 function getEmailAuthenticationTimestamp() {
15981638 $this->loadState();
15991639 return $this->mAuthenticationTimestamp;
16001640 }
16011641
 1642+ /**
 1643+ * @param $email
 1644+ * @return void
 1645+ */
16021646 function setEmail( $email ) {
16031647 $this->loadState();
16041648 if ( $this->mEmail !== $email ) {
@@ -1606,6 +1650,10 @@
16071651 }
16081652 }
16091653
 1654+ /**
 1655+ * @param $ts
 1656+ * @return void
 1657+ */
16101658 function setEmailAuthenticationTimestamp( $ts ) {
16111659 $this->loadState();
16121660 if ( $this->mAuthenticationTimestamp !== $ts ) {
@@ -1665,6 +1713,13 @@
16661714 return $this->mPassword;
16671715 }
16681716
 1717+ /**
 1718+ * @static
 1719+ * @param $name
 1720+ * @param $value
 1721+ * @param $exp
 1722+ * @return void
 1723+ */
16691724 static function setCookie( $name, $value, $exp = -1 ) {
16701725 global $wgCentralAuthCookiePrefix, $wgCentralAuthCookieDomain, $wgCookieSecure,
16711726 $wgCookieExpiration, $wgCookieHttpOnly;
@@ -1700,6 +1755,10 @@
17011756 }
17021757 }
17031758
 1759+ /**
 1760+ * @param $name
 1761+ * @return void
 1762+ */
17041763 protected function clearCookie( $name ) {
17051764 self::setCookie( $name, '', - 86400 );
17061765 }
@@ -1768,6 +1827,9 @@
17691828 $this->saveSettings();
17701829 }
17711830
 1831+ /**
 1832+ * @return
 1833+ */
17721834 function saveSettings() {
17731835 if ( !$this->mStateDirty ) return;
17741836 $this->mStateDirty = false;
@@ -1797,12 +1859,18 @@
17981860 $this->invalidateCache();
17991861 }
18001862
 1863+ /**
 1864+ * @return
 1865+ */
18011866 function getGlobalGroups() {
18021867 $this->loadGroups();
18031868
18041869 return $this->mGroups;
18051870 }
18061871
 1872+ /**
 1873+ * @return array
 1874+ */
18071875 function getGlobalRights() {
18081876 $this->loadGroups();
18091877
@@ -1820,6 +1888,10 @@
18211889 return $rights;
18221890 }
18231891
 1892+ /**
 1893+ * @param $groups
 1894+ * @return void
 1895+ */
18241896 function removeFromGlobalGroups( $groups ) {
18251897 $dbw = self::getCentralDB();
18261898
@@ -1831,6 +1903,10 @@
18321904 $this->invalidateCache();
18331905 }
18341906
 1907+ /**
 1908+ * @param $groups
 1909+ * @return void
 1910+ */
18351911 function addToGlobalGroups( $groups ) {
18361912 $dbw = self::getCentralDB();
18371913
@@ -1851,6 +1927,10 @@
18521928 $this->invalidateCache();
18531929 }
18541930
 1931+ /**
 1932+ * @static
 1933+ * @return array
 1934+ */
18551935 static function availableGlobalGroups() {
18561936 $dbr = self::getCentralSlaveDB();
18571937
@@ -1865,6 +1945,11 @@
18661946 return $groups;
18671947 }
18681948
 1949+ /**
 1950+ * @static
 1951+ * @param $group
 1952+ * @return array
 1953+ */
18691954 static function globalGroupPermissions( $group ) {
18701955 $dbr = self::getCentralSlaveDB();
18711956
@@ -1880,6 +1965,10 @@
18811966 return $rights;
18821967 }
18831968
 1969+ /**
 1970+ * @param $perm
 1971+ * @return bool
 1972+ */
18841973 function hasGlobalPermission( $perm ) {
18851974 $perms = $this->getGlobalRights();
18861975
@@ -1901,6 +1990,9 @@
19021991 return $rights;
19031992 }
19041993
 1994+ /**
 1995+ * @return void
 1996+ */
19051997 public function invalidateCache() {
19061998 if ( !$this->mDelayInvalidation ) {
19071999 wfDebugLog( 'CentralAuth', "Updating cache for global user {$this->mName}" );
@@ -1950,6 +2042,10 @@
19512043 $this->mDelayInvalidation = 1;
19522044 }
19532045
 2046+ /**
 2047+ * @static
 2048+ * @return string
 2049+ */
19542050 static function memcKey( /*...*/ ) {
19552051 global $wgCentralAuthDatabase;
19562052 $args = func_get_args();

Status & tagging log