r111691 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111690‎ | r111691 | r111692 >
Date:22:17, 16 February 2012
Author:reedy
Status:deferred (Comments)
Tags:php5.3 
Comment:
Modified paths:
  • /branches/wmf/1.19wmf1/extensions (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/AntiSpoof/AntiSpoofHooks.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/AntiSpoof/SpoofUser.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/extensions/AntiSpoof/SpoofUser.php
@@ -36,7 +36,7 @@
3737
3838 /**
3939 * Get the normalized key form
40 - * @return string|nuyll
 40+ * @return string|null
4141 */
4242 public function getNormalized() {
4343 return $this->mNormalized;
@@ -48,7 +48,7 @@
4949 * @return array empty if no conflict, or array containing conflicting usernames
5050 */
5151 public function getConflicts() {
52 - $dbr = self::getDBSlave();
 52+ $dbr = static::getDBSlave();
5353
5454 // Join against the user table to ensure that we skip stray
5555 // entries left after an account is renamed or otherwise munged.
@@ -108,7 +108,7 @@
109109 foreach ( $items as $item ) {
110110 $fields[] = $item->insertFields();
111111 }
112 - $dbw = self::getDBMaster();
 112+ $dbw = static::getDBMaster();
113113 $dbw->replace(
114114 'spoofuser',
115115 array( 'su_name' ),
@@ -121,7 +121,7 @@
122122 * @param $oldName
123123 */
124124 public function update( $oldName ) {
125 - $dbw = self::getDBMaster();
 125+ $dbw = static::getDBMaster();
126126
127127 if( $this->record() ) {
128128 $dbw->delete(
Index: branches/wmf/1.19wmf1/extensions/AntiSpoof/AntiSpoofHooks.php
@@ -52,7 +52,7 @@
5353 }
5454
5555 $name = $user->getName();
56 - $spoof = self::makeSpoofUser( $name );
 56+ $spoof = static::makeSpoofUser( $name );
5757 if ( $spoof->isLegal() ) {
5858 $normalized = $spoof->getNormalized();
5959 $conflicts = $spoof->getConflicts();
@@ -108,7 +108,7 @@
109109 * @return bool
110110 */
111111 public static function asAddNewAccountHook( $user ) {
112 - $spoof = self::makeSpoofUser( $user->getName() );
 112+ $spoof = static::makeSpoofUser( $user->getName() );
113113 $spoof->record();
114114 return true;
115115 }
@@ -123,7 +123,7 @@
124124 * @return bool
125125 */
126126 public static function asAddRenameUserHook( $uid, $oldName, $newName ) {
127 - $spoof = self::makeSpoofUser( $newName );
 127+ $spoof = static::makeSpoofUser( $newName );
128128 $spoof->update( $oldName );
129129 return true;
130130 }
Property changes on: branches/wmf/1.19wmf1/extensions
___________________________________________________________________
Modified: svn:mergeinfo
131131 Merged /trunk/extensions:r111688,111690

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r111688Fix targets by using LSBreedy22:09, 16 February 2012
r111690Few more LSB for good measurereedy22:14, 16 February 2012

Comments

#Comment by Awjrichards (talk | contribs)   20:08, 17 February 2012

Returning to 'new' as this breaks compatibility with PHP < 5.3, pending a change in minimum PHP requirement.

Status & tagging log