[imp] Deleting messages

Michael M Slusarz slusarz at horde.org
Fri Jul 18 16:04:38 UTC 2008


[Please keep discussions on the list]

Quoting Arminas <g.arminas at gmail.com>:

> It is me again. I would be glad if anyone could explain where is the
> mistake in the following code:
>
> /* Prepare the actions template. */
>     $a_template = new IMP_Template();
>     if ($use_trash)
>          /* &&
>         (($imp_mbox['mailbox'] ==
> (IMP::folderPref($prefs->getValue('trash_folder'), true))) || ($vtrash
> !== null)))
>         */
> {
>         $a_template->set('delete', Horde::widget('#', _("Delete"),
> 'widget', '', "if (confirm('" . addslashes(_("Are you sure you wish to
> permanently delete
>  these messages?")) . "')) { messages_submit('delete_messages'); }
> return false;", _("_Delete")));
>     } else {
>         $a_template->set('delete', Horde::widget('#', _("Delete"),
> 'widget', '', "messages_submit('delete_messages'); return false;",
> _("_Delete")));
>     }
>
>
> why it is still not deleting from INBOX view window? Where could be
> the problem? It just moves emails to trash directory. This code came
> from /horde/imp/mailbox.php file.

You need to change the parameters to IMP_Message::delete() in the  
action handler to always purge.  All you are doing here is changing  
whether the javascript alert window is displayed.

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the imp mailing list