Another safety switcher glitch fix
This commit is contained in:
parent
fd99821bd7
commit
9110a27167
1 changed files with 6 additions and 1 deletions
|
@ -55,7 +55,11 @@ class Model_User extends AbstractModel
|
||||||
|
|
||||||
public function enableSafety($safety, $enabled)
|
public function enableSafety($safety, $enabled)
|
||||||
{
|
{
|
||||||
$new = $this->getSetting(self::SETTING_SAFETY);
|
$all = $this->getSetting(self::SETTING_SAFETY);
|
||||||
|
if (!$all)
|
||||||
|
$all = PostSafety::toFlag(PostSafety::Safe);
|
||||||
|
|
||||||
|
$new = $all;
|
||||||
if (!$enabled)
|
if (!$enabled)
|
||||||
{
|
{
|
||||||
$new &= ~PostSafety::toFlag($safety);
|
$new &= ~PostSafety::toFlag($safety);
|
||||||
|
@ -66,6 +70,7 @@ class Model_User extends AbstractModel
|
||||||
{
|
{
|
||||||
$new |= PostSafety::toFlag($safety);
|
$new |= PostSafety::toFlag($safety);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setSetting(self::SETTING_SAFETY, $new);
|
$this->setSetting(self::SETTING_SAFETY, $new);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue