diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-05-26 10:35:26 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-05-26 10:35:26 +0200 |
commit | ead98f4efb712deb124655fd6fe0bf30d8e642c5 (patch) | |
tree | 349b9cdadccd50c9817e5b4b4ba6e30024b5f4fa | |
parent | 9a8a86efcae2c3c5ff36f71cbba7acd5ce3d4c6f (diff) | |
parent | d4d2e427a561d2fc93e6922f7c6d0ea3e8f6f4a9 (diff) |
Merge branch 'release-0.8' of github.com:roundcube/roundcubemail into release-0.8
-rw-r--r-- | .htaccess | 4 | ||||
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | plugins/hide_blockquote/hide_blockquote.js | 2 | ||||
-rw-r--r-- | plugins/hide_blockquote/skins/default/style.css | 2 | ||||
-rw-r--r-- | plugins/password/config.inc.php.dist | 3 | ||||
-rw-r--r-- | plugins/password/drivers/virtualmin.php | 4 | ||||
-rw-r--r-- | program/include/rcube_session.php | 35 | ||||
-rw-r--r-- | program/localization/en_US/labels.inc | 3 | ||||
-rw-r--r-- | program/steps/settings/func.inc | 12 | ||||
-rw-r--r-- | program/steps/settings/save_prefs.inc | 1 | ||||
-rw-r--r-- | skins/default/includes/messagetoolbar.html | 12 |
11 files changed, 48 insertions, 31 deletions
@@ -30,8 +30,8 @@ php_value mbstring.func_overload 0 RewriteEngine On RewriteRule ^favicon\.ico$ skins/default/images/favicon.ico # security rules -RewriteRule .git/ - [F] -RewriteRule ^README|INSTALL|LICENSE|SQL|bin|CHANGELOG$ - [F] +RewriteRule .git - [F] +RewriteRule ^/?(README(.md)?|INSTALL|LICENSE|SQL|bin|CHANGELOG)$ - [F] </IfModule> <IfModule mod_deflate.c> @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Move messages forwarding mode setting into Preferences - Fix HTML entities handling in HTML editor (#1488483) - Fix listing shared folders on Courier IMAP (#1488466) diff --git a/plugins/hide_blockquote/hide_blockquote.js b/plugins/hide_blockquote/hide_blockquote.js index 9ab90af0d..20286ee14 100644 --- a/plugins/hide_blockquote/hide_blockquote.js +++ b/plugins/hide_blockquote/hide_blockquote.js @@ -24,7 +24,7 @@ function hide_blockquote() .css({'white-space': 'nowrap', overflow: 'hidden', position: 'relative'}) .text(res[0]); - link = $('<span class="blockquote-link">') + link = $('<span class="blockquote-link"></span>') .css({position: 'absolute', 'z-Index': 2}) .text(rcmail.gettext('hide_blockquote.show')) .data('parent', div) diff --git a/plugins/hide_blockquote/skins/default/style.css b/plugins/hide_blockquote/skins/default/style.css index 7b3c871c3..198172f92 100644 --- a/plugins/hide_blockquote/skins/default/style.css +++ b/plugins/hide_blockquote/skins/default/style.css @@ -17,7 +17,7 @@ span.blockquote-link { border-top: none; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; - background: #fff; + background: #f8f8f8; background: -moz-linear-gradient(top, #f8f8f8 0%, #e8e8e8 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#e8e8e8)); background: -o-linear-gradient(top, #f8f8f8 0%, #e8e8e8 100%); diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist index aed0eaf28..37c79315d 100644 --- a/plugins/password/config.inc.php.dist +++ b/plugins/password/config.inc.php.dist @@ -308,7 +308,8 @@ $rcmail_config['hmailserver_server'] = array( // 5: domain-username // 6: username_domain // 7: domain_username -$rcmail_config['password_virtualmin_format'] = 0; +// 8: username@domain; mbox.username +$rcmail_config['password_virtualmin_format'] = 8; // pw_usermod Driver options diff --git a/plugins/password/drivers/virtualmin.php b/plugins/password/drivers/virtualmin.php index b2547e07f..f6b9bd412 100644 --- a/plugins/password/drivers/virtualmin.php +++ b/plugins/password/drivers/virtualmin.php @@ -48,6 +48,10 @@ class rcube_virtualmin_password $pieces = explode("_", $username); $domain = $pieces[0]; break; + case 8: // domain taken from alias, username left as it was + $email = $rcmail->user->data['alias']; + $domain = substr(strrchr($email, "@"), 1); + break default: // username@domain $domain = substr(strrchr($username, "@"), 1); } diff --git a/program/include/rcube_session.php b/program/include/rcube_session.php index 53042b3bf..4ac395472 100644 --- a/program/include/rcube_session.php +++ b/program/include/rcube_session.php @@ -40,7 +40,7 @@ class rcube_session private $unsets = array(); private $gc_handlers = array(); private $cookiename = 'roundcube_sessauth'; - private $vars = false; + private $vars; private $key; private $now; private $secret = ''; @@ -137,11 +137,10 @@ class rcube_session $this->vars = base64_decode($sql_arr['vars']); $this->key = $key; - if (!empty($this->vars)) - return $this->vars; + return !empty($this->vars) ? (string) $this->vars : ''; } - return false; + return null; } @@ -160,7 +159,7 @@ class rcube_session // no session row in DB (db_read() returns false) if (!$this->key) { - $oldvars = false; + $oldvars = null; } // use internal data from read() for fast requests (up to 0.5 sec.) else if ($key == $this->key && (!$this->vars || $ts - $this->start < 0.5)) { @@ -170,7 +169,7 @@ class rcube_session $oldvars = $this->db_read($key); } - if ($oldvars !== false) { + if ($oldvars !== null) { $newvars = $this->_fixvars($vars, $oldvars); if ($newvars !== $oldvars) { @@ -200,7 +199,7 @@ class rcube_session */ private function _fixvars($vars, $oldvars) { - if ($oldvars !== false) { + if ($oldvars !== null) { $a_oldvars = $this->unserialize($oldvars); if (is_array($a_oldvars)) { foreach ((array)$this->unsets as $k) @@ -268,13 +267,13 @@ class rcube_session $this->vars = $arr['vars']; $this->key = $key; - if (!empty($this->vars)) - return $this->vars; + return !empty($this->vars) ? (string) $this->vars : ''; } - return false; + return null; } + /** * Save session data. * handler for session_read() @@ -289,21 +288,22 @@ class rcube_session // no session data in cache (mc_read() returns false) if (!$this->key) - $oldvars = false; + $oldvars = null; // use internal data for fast requests (up to 0.5 sec.) else if ($key == $this->key && (!$this->vars || $ts - $this->start < 0.5)) $oldvars = $this->vars; else // else read data again $oldvars = $this->mc_read($key); - $newvars = $oldvars !== false ? $this->_fixvars($vars, $oldvars) : $vars; - + $newvars = $oldvars !== null ? $this->_fixvars($vars, $oldvars) : $vars; + if ($newvars !== $oldvars || $ts - $this->changed > $this->lifetime / 2) return $this->memcache->set($key, serialize(array('changed' => time(), 'ip' => $this->ip, 'vars' => $newvars)), MEMCACHE_COMPRESSED, $this->lifetime); - + return true; } + /** * Handler for session_destroy() with memcache backend * @@ -352,7 +352,7 @@ class rcube_session { session_regenerate_id($destroy); - $this->vars = false; + $this->vars = null; $this->key = session_id(); return true; @@ -375,13 +375,14 @@ class rcube_session return true; } - + + /** * Kill this session */ public function kill() { - $this->vars = false; + $this->vars = null; $this->ip = $_SERVER['REMOTE_ADDR']; // update IP (might have changed) $this->destroy(session_id()); rcmail::setcookie($this->cookiename, '-del-', time() - 60); diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 277f1a954..94bae1974 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -457,6 +457,9 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers'; $labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized'; $labels['addtodict'] = 'Add to dictionary'; $labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links'; +$labels['forwardmode'] = 'Messages forwarding'; +$labels['inline'] = 'inline'; +$labels['asattachment'] = 'as attachment'; $labels['folder'] = 'Folder'; $labels['folders'] = 'Folders'; diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index d2db1dfdd..dc7c68e3b 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -620,6 +620,18 @@ function rcmail_user_prefs($current=null) ); } + if (!isset($no_override['forward_attachment'])) { + $field_id = 'rcmfd_forward_attachment'; + $select = new html_select(array('name' => '_forward_attachment', 'id' => $field_id)); + $select->add(rcube_label('inline'), 0); + $select->add(rcube_label('asattachment'), 1); + + $blocks['main']['options']['forward_attachment'] = array( + 'title' => html::label($field_id, Q(rcube_label('forwardmode'))), + 'content' => $select->show(intval($config['forward_attachment'])), + ); + } + if (!isset($no_override['default_font'])) { $field_id = 'rcmfd_default_font'; $fonts = rcube_fontdefs(); diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index f521f4f34..cacc359e9 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -89,6 +89,7 @@ switch ($CURR_SECTION) 'strip_existing_sig' => isset($_POST['_strip_existing_sig']), 'sig_above' => !empty($_POST['_sig_above']) && !empty($_POST['_top_posting']), 'default_font' => get_input_value('_default_font', RCUBE_INPUT_POST), + 'forward_attachment' => !empty($_POST['_forward_attachment']), ); break; diff --git a/skins/default/includes/messagetoolbar.html b/skins/default/includes/messagetoolbar.html index 57bed8a34..3f4995b83 100644 --- a/skins/default/includes/messagetoolbar.html +++ b/skins/default/includes/messagetoolbar.html @@ -26,15 +26,9 @@ </div> <div id="forwardmenu" class="popupmenu"> - <ul class="toolbarmenu"> - <li class="block"> - <input type="radio" name="forwardtype" value="0" onchange="rcmail.command('save-pref', {name: 'forward_attachment', value: 0, env: 'forward_attachment'});" /> - <roundcube:button command="forward" label="forwardinline" prop="sub" classAct="forwardlink active" class="forwardlink" /> - </li> - <li class="block"> - <input type="radio" name="forwardtype" value="1" onchange="rcmail.command('save-pref', {name: 'forward_attachment', value: 1, env: 'forward_attachment'})" /> - <roundcube:button command="forward-attachment" label="forwardattachment" prop="sub" classAct="forwardattachmentlink active" class="forwardattachmentlink" /> - </li> + <ul> + <li><roundcube:button command="forward" label="forwardinline" prop="sub" classAct="forwardlink active" class="forwardlink" /></li> + <li><roundcube:button command="forward-attachment" label="forwardattachment" prop="sub" classAct="forwardattachmentlink active" class="forwardattachmentlink" /></li> <roundcube:container name="forwardmenu" id="forwardmenu" /> </ul> </div> |