diff options
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; } } |