return false;
}
- $this->{ $this->mMode } ();
+ $this->{$this->mMode}();
+
return true;
}
array( 'user_id' ),
array(),
__METHOD__
- );
+ );
foreach ( $result as $id ) {
@$ret[$this->mAnOption][$userValue]++;
// @codingStandardsIgnoreEnd
}
-
} else {
foreach ( $defaultOptions as $name => $defaultValue ) {
array( 'user_id' ),
array(),
__METHOD__
- );
+ );
foreach ( $result as $id ) {
if ( !$this->mQuiet ) {
print " OK\n";
}
-
} elseif ( !$this->mQuiet ) {
print "Not changing '$username' using <{$this->mAnOption}> = '$curValue'\n";
}
foreach ( $def as $optname => $defaultValue ) {
array_push( $ret, $optname );
}
+
return $ret;
}
#
public static function showUsageAndExit() {
-print <<<USAGE
+ print <<<USAGE
This script pass through all users and change one of their options.
The new option is NOT validated.
--dry : do not save user settings back to database
USAGE;
- exit( 0 );
+ exit( 0 );
}
/**
return true;
}
-print <<<WARN
+ print <<<WARN
The script is about to change the skin for ALL USERS in the database.
Users with option <$this->mAnOption> = '$this->mOldValue' will be made to use '$this->mNewValue'.
Abort with control-c in the next five seconds....
WARN;
wfCountDown( 5 );
+
return true;
}
-
}