X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FresetUserTokens.php;h=154482c75a24990eb9087e24002612258139b46c;hp=235b37f710d64724c3d81564b477b61dfdf23c4a;hb=fa0f6f34972c0e0f4aac24a03b3efdfc45f256f6;hpb=1a21a63d52b9ebf940cd35f041d675d39c9d474a diff --git a/maintenance/resetUserTokens.php b/maintenance/resetUserTokens.php index 235b37f710..154482c75a 100644 --- a/maintenance/resetUserTokens.php +++ b/maintenance/resetUserTokens.php @@ -50,10 +50,10 @@ class ResetUserTokens extends Maintenance { } public function execute() { - $this->nullsOnly = $this->getOption( 'nulls' ); + $nullsOnly = $this->getOption( 'nulls' ); if ( !$this->getOption( 'nowarn' ) ) { - if ( $this->nullsOnly ) { + if ( $nullsOnly ) { $this->output( "The script is about to reset the user_token " . "for USERS WITH NULL TOKENS in the database.\n" ); } else { @@ -68,11 +68,10 @@ class ResetUserTokens extends Maintenance { } // We list user by user_id from one of the replica DBs - // We list user by user_id from one of the slave database $dbr = $this->getDB( DB_REPLICA ); $where = []; - if ( $this->nullsOnly ) { + if ( $nullsOnly ) { // Have to build this by hand, because \ is escaped in helper functions $where = [ 'user_token = \'' . str_repeat( '\0', 32 ) . '\'' ]; }