From: jangliss Date: Sat, 8 Mar 2003 04:41:35 +0000 (+0000) Subject: DMN now remembers the last target mailbox to match up with the rest of SM X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c81eba29df264ad4f90f89790d9a6ad40a0b7c66;p=squirrelmail.git DMN now remembers the last target mailbox to match up with the rest of SM git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4618 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/plugins/delete_move_next/setup.php b/plugins/delete_move_next/setup.php index 67083dab..da52c456 100644 --- a/plugins/delete_move_next/setup.php +++ b/plugins/delete_move_next/setup.php @@ -218,8 +218,13 @@ function delete_move_next_read($currloc) { } function get_move_target_list() { - global $imapConnection; - echo sqimap_mailbox_option_list($imapConnection); + global $imapConnection, $lastTargetMailbox; + if (isset($lastTargetMailbox) && !empty($lastTargetMailbox)) { + echo sqimap_mailbox_option_list($imapConnection, array(strtolower($lastTargetMailbox))); + } + else { + echo sqimap_mailbox_option_list($imapConnection); + } } function delete_move_next_moveNextForm($next) { @@ -292,7 +297,7 @@ function delete_move_next_delete() { } function delete_move_next_move() { - global $imapConnection, $mailbox, $auto_expunge; + global $imapConnection, $mailbox, $auto_expunge, $lastTargetMailbox; if ( !check_php_version(4,1) ) { global $_POST; @@ -309,6 +314,11 @@ function delete_move_next_move() { delete_move_expunge_from_all($move_id); // sqimap_mailbox_expunge($imapConnection, $mailbox, true); } + + if ($targetMailbox != $lastTargetMailbox) { + $lastTargetMailbox = $targetMailbox; + sqsession_register('lastTargetMailbox' , $lastTargetMailbox); + } } function delete_move_next_display_inside() {