mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Config/Locales
* flag locales as 'required' * allow bitmasks to be empty unless required * skip empty check in javascript
This commit is contained in:
@@ -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), {
|
||||
|
||||
Reference in New Issue
Block a user