X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fuser%2FUserNamePrefixSearch.php;h=c185babcfb1ee228df8161aea9e946ab51fe4340;hb=9699158f742ce3c927c661bdd12d6a73b7a0235d;hp=4a27a135d5d8ecf744d7c93fb6f6b43559a6e62f;hpb=e3bd13db0c285f312e31bb1b7271af4628cca80c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/user/UserNamePrefixSearch.php b/includes/user/UserNamePrefixSearch.php index 4a27a135d5..c185babcfb 100644 --- a/includes/user/UserNamePrefixSearch.php +++ b/includes/user/UserNamePrefixSearch.php @@ -39,7 +39,7 @@ class UserNamePrefixSearch { public static function search( $audience, $search, $limit, $offset = 0 ) { $user = User::newFromName( $search ); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $prefix = $user ? $user->getName() : ''; $tables = [ 'user' ]; $cond = [ 'user_name ' . $dbr->buildLike( $prefix, $dbr->anyString() ) ]; @@ -65,6 +65,6 @@ class UserNamePrefixSearch { $joinConds ); - return $res === false ? [] : $res; + return $res; } }