]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
quota, acl: Use mail_user_plugin_getenv_bool() for boolean settings
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 30 Mar 2017 13:43:58 +0000 (16:43 +0300)
committerGitLab <gitlab@git.dovecot.net>
Fri, 31 Mar 2017 06:39:11 +0000 (09:39 +0300)
These were forgotten earlier.

src/plugins/acl/acl-backend.c
src/plugins/quota/quota.c

index 72b44a70717d24a52045dca1c1dd3218a57e2ca5..ab22b67587addee9d9a281e31725739fb54dd8c6 100644 (file)
@@ -170,7 +170,7 @@ struct acl_object *acl_backend_get_default_object(struct acl_backend *backend)
        if (backend->default_aclobj != NULL)
                return backend->default_aclobj;
 
-       if (mail_user_plugin_getenv(user, "acl_defaults_from_inbox") != NULL) {
+       if (mail_user_plugin_getenv_bool(user, "acl_defaults_from_inbox")) {
                if (ns->type == MAIL_NAMESPACE_TYPE_PRIVATE ||
                    ns->type == MAIL_NAMESPACE_TYPE_SHARED)
                        default_name = "INBOX";
index f3f688ef15be70c484f1e9d499209cc3d1d050b3..1cb0f3a28b42278cc2371116948d42835ae21a57 100644 (file)
@@ -1217,7 +1217,7 @@ void quota_over_flag_check_startup(struct quota *quota)
        roots = array_get(&quota->roots, &count);
        for (i = 0; i < count; i++) {
                name = t_strconcat(roots[i]->set->set_name, "_over_flag_lazy_check", NULL);
-               if (mail_user_plugin_getenv(roots[i]->quota->user, name) == NULL)
+               if (!mail_user_plugin_getenv_bool(roots[i]->quota->user, name))
                        quota_over_flag_check_root(roots[i]);
        }
 }