Config/Locales
* flag locales as 'required' * allow bitmasks to be empty unless required * skip empty check in javascript
This commit is contained in:
parent
37def70f6a
commit
98b1771850
4 changed files with 4 additions and 9 deletions
|
|
@ -342,7 +342,7 @@ class Cfg
|
|||
foreach (explode(', ', $info) as $option)
|
||||
$mask |= (1 << explode(':', $option)[0]);
|
||||
|
||||
if (!($value &= $mask))
|
||||
if (!($value &= $mask) && ($flags & self::FLAG_REQUIRED))
|
||||
return 'value not in range';
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
1
setup/updates/1720451578_01.sql
Normal file
1
setup/updates/1720451578_01.sql
Normal file
|
|
@ -0,0 +1 @@
|
|||
UPDATE `aowow_config` SET `flags` = 1441 WHERE `key` = 'locales';
|
||||
|
|
@ -193,12 +193,6 @@
|
|||
|
||||
value = value.toString().trim();
|
||||
|
||||
if (!value.length && (node.tagName != 'INPUT' || node.type != 'text'))
|
||||
{
|
||||
$WH.ae(_status, createStatusIcon('value is empty'));
|
||||
return;
|
||||
}
|
||||
|
||||
$(_status).append(CreateAjaxLoader());
|
||||
|
||||
new Ajax('?admin=siteconfig&action=update&key=' + id + '&val=' + escape(value), {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue