Aleksander Machniak
2012-09-11 1e9aa256091f56589e75489deff3259a3586ad1f
Fix error where session wasn't updated after folder rename/delete (#1488692)
3 files modified
20 ■■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/steps/settings/folders.inc 10 ●●●●● patch | view | raw | blame | history
program/steps/settings/save_folder.inc 9 ●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix error where session wasn't updated after folder rename/delete (#1488692)
- Replace data URIs of images (pasted in HTML editor) with inline attachments (#1488502)
- Fix PLAIN authentication for some IMAP servers (#1488674)
- Fix encoding vCard file when contains PHOTO;ENCODING=b (#1488683)
program/steps/settings/folders.inc
@@ -85,6 +85,11 @@
        else {
            $deleted = $plugin['result'];
        }
        // #1488692: update session
        if ($deleted && $_SESSION['mbox'] === $mbox) {
            $RCMAIL->session->remove('mbox');
        }
    }
    if ($OUTPUT->ajax_call && $deleted) {
@@ -402,6 +407,11 @@
        }
        $RCMAIL->user->save_prefs(array('message_threading' => $a_threaded));
        // #1488692: update session
        if ($_SESSION['mbox'] === $oldname) {
            $_SESSION['mbox'] = $newname;
        }
        return true;
    }
program/steps/settings/save_folder.inc
@@ -1,11 +1,11 @@
<?php
/*
/**
 +-----------------------------------------------------------------------+
 | program/steps/settings/save_folder.inc                                |
 |                                                                       |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2005-2009, The Roundcube Dev Team                       |
 | Copyright (C) 2005-2012, The Roundcube Dev Team                       |
 |                                                                       |
 | Licensed under the GNU General Public License version 3 or            |
 | any later version with exceptions for skins & plugins.                |
@@ -183,7 +183,12 @@
        }
        $OUTPUT->show_message('folderupdated', 'confirmation');
        if ($rename) {
            // #1488692: update session
            if ($_SESSION['mbox'] === $folder['oldname']) {
                $_SESSION['mbox'] = $folder['name'];
            }
            rcmail_update_folder_row($folder['name'], $folder['oldname'], $folder['subscribe'], $folder['class']);
            $OUTPUT->send('iframe');
        }