Changeset 9281884 in github


Ignore:
Timestamp:
Sep 18, 2008 5:29:57 AM (5 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
095d05e
Parents:
b8817ea
Message:
  • don't add new row to messages list if only marking as deleted (flag_for_deletion=true)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/steps/mail/move_del.inc

    rd224551 r9281884  
    2828    $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST)))); 
    2929    $target = get_input_value('_target_mbox', RCUBE_INPUT_POST); 
    30     $moved = $IMAP->move_message($uids, $target, get_input_value('_mbox', RCUBE_INPUT_POST)); 
     30    $mbox = get_input_value('_mbox', RCUBE_INPUT_POST); 
     31    $moved = $IMAP->move_message($uids, $target, $mbox); 
    3132   
    32     if ($moved) { 
    33         // flag old messages as read because rcube_imap will not send expunge command after moving 
    34         if ($CONFIG['read_when_deleted']) 
    35             $IMAP->set_flag($uids, 'SEEN'); 
    36     } 
    37     else { 
     33    if (!$moved) { 
    3834        // send error message 
    3935        $OUTPUT->command('list_mailbox'); 
     
    4238        exit; 
    4339    } 
     40 
     41    // flag old messages as read because rcube_imap will not send expunge command after moving 
     42    if ($CONFIG['read_when_deleted']) 
     43        $IMAP->set_flag($uids, 'SEEN'); 
     44 
     45    if (!$CONFIG['flag_for_deletion']) 
     46        $addrows = true; 
    4447} 
    4548// delete messages  
    4649else if ($RCMAIL->action=='delete' && !empty($_POST['_uid'])) { 
    4750    $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST)))); 
    48     $del = $IMAP->delete_message($uids, get_input_value('_mbox', RCUBE_INPUT_POST)); 
     51    $mbox = get_input_value('_mbox', RCUBE_INPUT_POST); 
     52    $del = $IMAP->delete_message($uids, $mbox); 
    4953   
    5054    if (!$del) { 
     
    5559        exit; 
    5660    } 
     61     
     62    $addrows = true; 
    5763} 
    5864// unknown action or missing query param 
     
    8389$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count)); 
    8490 
    85  
    8691// update mailboxlist 
    8792$mbox = $IMAP->get_mailbox_name(); 
     
    95100 
    96101// add new rows from next page (if any) 
    97 if ($_POST['_from']!='show' && ($jump_back || $nextpage_count > 0)) { 
     102if ($addrows && $_POST['_from']!='show' && ($jump_back || $nextpage_count > 0)) { 
    98103    $sort_col   = isset($_SESSION['sort_col'])   ? $_SESSION['sort_col']   : $CONFIG['message_sort_col']; 
    99104    $sort_order = isset($_SESSION['sort_order']) ? $_SESSION['sort_order'] : $CONFIG['message_sort_order']; 
Note: See TracChangeset for help on using the changeset viewer.