mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-11-09 18:26:20 +00:00
[Web] Archive setting of a mailbox: accept true and false
This commit is contained in:
2 files changed
+4
-1
No files matched your search
@@ -34,9 +34,10 @@ class Mailbox
|
||||
);
|
||||
}
|
||||
|
||||
/** Mailbox setting as stored: '1', '0', anything else (also a missing attribute) is 'inherit' */
|
||||
/** Mailbox setting: '1', '0' (also as number or boolean), anything else (also a missing attribute) is 'inherit' */
|
||||
public static function setting(mixed $value): string
|
||||
{
|
||||
$value = is_bool($value) ? (int)$value : $value;
|
||||
$value = is_scalar($value) ? (string)$value : '';
|
||||
return in_array($value, ['0', '1'], true) ? $value : self::INHERIT;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user