diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:32:59 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:32:59 -0400 |
commit | 6dc1997577fab2c366781fd7048144935afa0012 (patch) | |
tree | 8918d28c7ab4342f0738985e37af1dfc42d0e93a /extensions/Renameuser/RenameUserJob.php | |
parent | 150f94f051128f367bc89f6b7e5f57eb2a69fc62 (diff) | |
parent | fa89acd685cb09cdbe1c64cbb721ec64975bbbc1 (diff) |
Merge commit 'fa89acd'
# Conflicts:
# .gitignore
# extensions/ArchInterWiki.sql
Diffstat (limited to 'extensions/Renameuser/RenameUserJob.php')
-rw-r--r-- | extensions/Renameuser/RenameUserJob.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/extensions/Renameuser/RenameUserJob.php b/extensions/Renameuser/RenameUserJob.php index d2dc14c4..2edfc44d 100644 --- a/extensions/Renameuser/RenameUserJob.php +++ b/extensions/Renameuser/RenameUserJob.php @@ -1,4 +1,5 @@ <?php + /** * Custom job to perform updates on tables in busier environments */ @@ -27,7 +28,9 @@ class RenameUserJob extends Job { $oldname = $this->params['oldname']; $userID = isset( $this->params['userID'] ) ? $this->params['userID'] : null; $uidColumn = isset( $this->params['uidColumn'] ) ? $this->params['uidColumn'] : null; - $timestampColumn = isset( $this->params['timestampColumn'] ) ? $this->params['timestampColumn'] : null; + $timestampColumn = isset( $this->params['timestampColumn'] ) ? + $this->params['timestampColumn'] : + null; $minTimestamp = $this->params['minTimestamp']; $maxTimestamp = $this->params['maxTimestamp']; $uniqueKey = isset( $this->params['uniqueKey'] ) ? $this->params['uniqueKey'] : null; @@ -45,7 +48,7 @@ class RenameUserJob extends Job { if ( isset( $timestampColumn ) ) { $conds[] = "$timestampColumn >= '$minTimestamp'"; $conds[] = "$timestampColumn <= '$maxTimestamp'"; - # Otherwise, bound by key (B/C) + # Otherwise, bound by key (B/C) } elseif ( isset( $uniqueKey ) ) { $conds[$uniqueKey] = $keyId; } else { @@ -59,7 +62,7 @@ class RenameUserJob extends Job { __METHOD__ ); # Special case: revisions may be deleted while renaming... - if ( $table == 'revision' && isset( $timestampColumn ) ) { + if ( $table === 'revision' && isset( $timestampColumn ) ) { $actual = $dbw->affectedRows(); # If some revisions were not renamed, they may have been deleted. # Do a pass on the archive table to get these straglers... @@ -77,7 +80,7 @@ class RenameUserJob extends Job { } } # Special case: revisions may be restored while renaming... - if ( $table == 'archive' && isset( $timestampColumn ) ) { + if ( $table === 'archive' && isset( $timestampColumn ) ) { $actual = $dbw->affectedRows(); # If some revisions were not renamed, they may have been restored. # Do a pass on the revision table to get these straglers... @@ -94,6 +97,7 @@ class RenameUserJob extends Job { ); } } + return true; } } |