| | |
| | | $success = $STORAGE->delete_message('*', $mbox); |
| | | $delete = true; |
| | | } |
| | | // copy to Trash |
| | | // move to Trash |
| | | else { |
| | | $success = $STORAGE->move_message('1:*', $trash_mbox, $mbox); |
| | | $delete = false; |
| | |
| | | $OUTPUT->set_env('messagecount', 0); |
| | | if ($delete) { |
| | | $OUTPUT->show_message('folderpurged', 'confirmation'); |
| | | $OUTPUT->command('set_quota', $RCMAIL->quota_content()); |
| | | $OUTPUT->command('set_quota', $RCMAIL->quota_content(null, $mbox)); |
| | | } |
| | | else { |
| | | $OUTPUT->show_message('messagemoved', 'confirmation'); |
| | |
| | | $a_threaded = (array) $RCMAIL->config->get('message_threading', array()); |
| | | $oldprefix = '/^' . preg_quote($oldname . $delimiter, '/') . '/'; |
| | | |
| | | foreach (array_keys($a_threaded) as $key) { |
| | | foreach ($a_threaded as $key => $val) { |
| | | if ($key == $oldname) { |
| | | unset($a_threaded[$key]); |
| | | $a_threaded[$newname] = true; |
| | | $a_threaded[$newname] = $val; |
| | | } |
| | | else if (preg_match($oldprefix, $key)) { |
| | | unset($a_threaded[$key]); |
| | | $a_threaded[preg_replace($oldprefix, $newname.$delimiter, $key)] = true; |
| | | $a_threaded[preg_replace($oldprefix, $newname.$delimiter, $key)] = $val; |
| | | } |
| | | } |
| | | |
| | | $RCMAIL->user->save_prefs(array('message_threading' => $a_threaded)); |
| | | |
| | | // #1488692: update session |