r111688 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111687‎ | r111688 | r111689 >
Date:22:09, 16 February 2012
Author:reedy
Status:reverted (Comments)
Tags:gerritmigration, php5.3, todo 
Comment:
Fix targets by using LSB
Modified paths:
  • /trunk/extensions/AntiSpoof/SpoofUser.php (modified) (history)

Diff [purge]

Index: trunk/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(

Follow-up revisions

RevisionCommit summaryAuthorDate
r111691MFT r111688, r111690reedy22:17, 16 February 2012
r114392Revert r111688, r111690, r114156. Unreviewed revisions in AntiSpoof....catrope19:12, 21 March 2012

Comments

#Comment by Aaron Schulz (talk | contribs)   00:32, 17 February 2012

So we require 5.3.0 now?

#Comment by Reedy (talk | contribs)   00:38, 17 February 2012

For AntiSpoof/CentralAuth, yeah. I could have spent hours messing around, or just copy pasting larges blocks of code (eugh)...

5.3 came out 2 and a half years ago now

Ubuntu LTS (10.04) has 5.3.2

We should bump our requirements for 1.20 ;)

#Comment by Aaron Schulz (talk | contribs)   05:13, 17 February 2012

+1.

#Comment by Nikerabbit (talk | contribs)   07:10, 17 February 2012

Please announce this on mailing lists so that everyone is aware.

#Comment by Reedy (talk | contribs)   16:14, 17 February 2012

I'll write a mailing list post proposing the bump of the minimum version to PHP 5.3

#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.

#Comment by Hashar (talk | contribs)   09:31, 29 February 2012

I do not understand what it is supposed to fix. If there self:: is broken there, can not we just use the good old wfGetDB( <DB_SLAVE | DB_MASTER> ); ?

#Comment by Reedy (talk | contribs)   13:42, 29 February 2012

No.. In some cases, that'd be fine, as we want to use the local wikis database, and from that, the antispoof table.

If we're visiting it via the CentralAuth extra hooks, wfGetDB is no use, and we want to get it from the antispoof table of the centralauth database

#Comment by Hashar (talk | contribs)   14:43, 26 March 2012

This revision is now in Gerrit https://gerrit.wikimedia.org/r/3408

Status & tagging log