-int mx_acl_check (CONTEXT* ctx, int flag) {
- if (!ctx || !MX_IDX(ctx->magic-1))
- return (0);
- /* if no acl_check defined for module, assume permission is granted */
- if (!mxfmts[ctx->magic-1]->mx_acl_check)
- return (1);
- return (mxfmts[ctx->magic-1]->mx_acl_check(ctx,flag));
-}
-
-int mx_rebuild_cache (void) {
-#ifndef USE_HCACHE
- mutt_error (_("Support for header caching was not build in."));
- return (1);
-#else
- int i = 0, magic = 0;
- CONTEXT* ctx = NULL;
- BUFFY* b = NULL;
-
- if (!Incoming.len) {
- mutt_error (_("No mailboxes defined."));
- return (1);
- }
-
- for (i = 0; i < Incoming.len; i++) {
- b = Incoming.arr[i];
- magic = mx_get_magic (b->path);
- if (magic != M_MAILDIR && magic != M_MH && magic != M_IMAP)
- continue;
- sidebar_set_current (b->path);
- sidebar_draw ();
- if ((ctx = mx_open_mailbox (b->path,
- M_READONLY | M_NOSORT | M_COUNT,
- NULL)) != NULL)
- mx_close_mailbox (ctx, 0);
- }
- mutt_clear_error ();
-
- if (Context && Context->path)
- sidebar_set_current (Context->path);
- sidebar_draw ();
-
- return (0);
-#endif
+int mx_acl_check(CONTEXT *ctx, int flag)
+{
+ if (!mxfmts[ctx->magic-1]->mx_acl_check)
+ return 1;
+ return mxfmts[ctx->magic-1]->mx_acl_check(ctx,flag);