Setup/Misc

* fixed variable name: setup parameter --locales should work again.
 * escaped GROUPS as keyword in mysql8
This commit is contained in:
Sarjuuk 2022-02-12 14:15:03 +01:00
parent 061449686d
commit c950cdc757
3 changed files with 4 additions and 5 deletions

View file

@ -191,7 +191,7 @@ class MorePage extends GenericPage
SELECT
a.id AS ARRAY_KEY,
a.displayName AS username,
a.userGroups AS groups,
a.userGroups AS `groups`,
a.joinDate AS creation,
SUM(r.amount) AS reputation,
SUM(IF(r.`action` = 3, 1, 0)) AS comments,

View file

@ -117,11 +117,10 @@ class CLISetup
// engb and enus are identical for all intents and purposes
$from = ['engb', 'esmx', 'encn'];
$to = ['enus', 'eses', 'zhcn'];
$_['locales'] = str_ireplace($from, $to, strtolower($_['locales']));
$opts['locales'] = str_ireplace($from, $to, strtolower($opts['locales']));
self::$locales = array_intersect(Util::$localeStrings, explode(',', $_['locales']));
self::$locales = array_intersect(Util::$localeStrings, explode(',', $opts['locales']));
}
if (!self::$locales)
self::$locales = array_filter(Util::$localeStrings);

View file

@ -386,7 +386,7 @@ if (!CLI)
// excludes; type => [excludeGroupBit => [typeIds]]
$excludes = [];
$exData = DB::Aowow()->selectCol('SELECT `type` AS ARRAY_KEY, `typeId` AS ARRAY_KEY2, groups FROM ?_profiler_excludes');
$exData = DB::Aowow()->selectCol('SELECT `type` AS ARRAY_KEY, `typeId` AS ARRAY_KEY2, `groups` FROM ?_profiler_excludes');
for ($i = 0; (1 << $i) < PR_EXCLUDE_GROUP_ANY; $i++)
foreach ($exData as $type => $data)
if ($ids = array_keys(array_filter($data, function ($x) use ($i) { return $x & (1 << $i); } )))