From d8ea3d55394917e776165057fd186c618c1b3e71 Mon Sep 17 00:00:00 2001 From: Boris Gulay Date: Sat, 22 Dec 2018 16:50:46 +0300 Subject: [PATCH] Fix setting flags on form load. --- ident_switch.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ident_switch.php b/ident_switch.php index 8143651..3134b65 100644 --- a/ident_switch.php +++ b/ident_switch.php @@ -250,8 +250,8 @@ class ident_switch extends rcube_plugin $record['ident_switch.form.' . $dbToForm[$k]] = $v; // Parse flags - $record['ident_switch.form.common.enabled'] = $row['flags'] & self::DB_ENABLED; - $record['ident_switch.form.imap.tls'] = $row['flags'] & self::DB_SECURE_IMAP_TLS; + $record['ident_switch.form.common.enabled'] = !!($row['flags'] & self::DB_ENABLED); + $record['ident_switch.form.imap.tls'] = !!($row['flags'] & self::DB_SECURE_IMAP_TLS); // Set readonly if needed $cfg = $this->get_preconfig($record['email']);