Aleksander Machniak
2013-06-11 174327c25cd68f203e0985df51b94765738c7dce
program/include/rcmail.php
@@ -746,7 +746,7 @@
    // before closing the database connection, write session data
    if ($_SERVER['REMOTE_ADDR'] && is_object($this->session)) {
      session_write_close();
      $this->session->write_close();
    }
    // write performance stats to logs/console
@@ -1326,7 +1326,7 @@
        $msgcounts = $this->storage->get_cache('messagecount');
        $collapsed = $this->config->get('collapsed_folders');
        if ($this->config->get('show_actual_foldernames'))
        if ($this->config->get('show_real_foldernames'))
            $realnames = true;
        $out = '';
@@ -1494,7 +1494,7 @@
            if ($count > 1) {
                for ($i = 0; $i < $count; $i++) {
                    $folder = implode($delimiter, array_slice($path, 0, -$i));
                    if (!$this->config->get('show_actual_foldernames') &&
                    if (!$this->config->get('show_real_foldernames') &&
                        ($folder_class = $this->folder_classname($folder))) {
                        $name = implode($delimiter, array_slice($path, $count - $i));
                        return $this->gettext($folder_class) . $delimiter . rcube_charset::convert($name, 'UTF7-IMAP');
@@ -1503,7 +1503,7 @@
            }
        }
        if (!$this->config->get('show_actual_foldernames') &&
        if (!$this->config->get('show_real_foldernames') &&
            ($folder_class = $this->folder_classname($name))) {
            return $this->gettext($folder_class);
        }
@@ -1564,11 +1564,7 @@
        $quota_result = (array) $quota;
        $quota_result['type'] = isset($_SESSION['quota_display']) ? $_SESSION['quota_display'] : '';
        if (!$quota['total'] && $this->config->get('quota_zero_as_unlimited')) {
            $quota_result['title']   = $this->gettext('unlimited');
            $quota_result['percent'] = 0;
        }
        else if ($quota['total']) {
        if ($quota['total'] > 0) {
            if (!isset($quota['percent'])) {
                $quota_result['percent'] = min(100, round(($quota['used']/max(1,$quota['total']))*100));
            }
@@ -1587,7 +1583,8 @@
            }
        }
        else {
            $quota_result['title']   = $this->gettext('unknown');
            $unlimited               = $this->config->get('quota_zero_as_unlimited');
            $quota_result['title']   = $this->gettext($unlimited ? 'unlimited' : 'unknown');
            $quota_result['percent'] = 0;
        }