X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FuserOptions.inc;h=c657c03f7bf7bfdc3564a062fade439cf3f910dc;hb=5473e9e9eeea71b0a32b2b0e703529e196721407;hp=f4ffbd04af1cac64ca8b06ecfa924672e0d24338;hpb=cb2896f90ebef77c02c9da4067b0e56e37471092;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/userOptions.inc b/maintenance/userOptions.inc index f4ffbd04af..c657c03f7b 100644 --- a/maintenance/userOptions.inc +++ b/maintenance/userOptions.inc @@ -22,8 +22,8 @@ */ // Options we will use -$options = array( 'list', 'nowarn', 'quiet', 'usage', 'dry' ); -$optionsWithArgs = array( 'old', 'new' ); +$options = [ 'list', 'nowarn', 'quiet', 'usage', 'dry' ]; +$optionsWithArgs = [ 'old', 'new' ]; require_once __DIR__ . '/commandLine.inc'; @@ -137,14 +137,14 @@ class UserOptions { * List options usage */ private function USAGER() { - $ret = array(); + $ret = []; $defaultOptions = User::getDefaultOptions(); - // We list user by user_id from one of the slave database - $dbr = wfGetDB( DB_SLAVE ); + // We list user by user_id from one of the replica DBs + $dbr = wfGetDB( DB_REPLICA ); $result = $dbr->select( 'user', - array( 'user_id' ), - array(), + [ 'user_id' ], + [], __METHOD__ ); @@ -194,11 +194,11 @@ class UserOptions { private function CHANGER() { $this->warn(); - // We list user by user_id from one of the slave database - $dbr = wfGetDB( DB_SLAVE ); + // We list user by user_id from one of the replica DBs + $dbr = wfGetDB( DB_REPLICA ); $result = $dbr->select( 'user', - array( 'user_id' ), - array(), + [ 'user_id' ], + [], __METHOD__ ); @@ -238,7 +238,7 @@ class UserOptions { */ public static function getDefaultOptionsNames() { $def = User::getDefaultOptions(); - $ret = array(); + $ret = []; foreach ( $def as $optname => $defaultValue ) { array_push( $ret, $optname ); }