summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rwxr-xr-xbin/updatedb.sh7
-rw-r--r--plugins/newmail_notifier/config.inc.php.dist3
-rw-r--r--plugins/newmail_notifier/localization/en_US.inc1
-rw-r--r--plugins/newmail_notifier/newmail_notifier.js14
-rw-r--r--plugins/newmail_notifier/newmail_notifier.php25
-rw-r--r--plugins/newmail_notifier/package.xml4
-rw-r--r--program/lib/Roundcube/rcube_config.php2
-rw-r--r--program/lib/Roundcube/rcube_db.php36
-rw-r--r--program/lib/Roundcube/rcube_db_mysql.php25
-rw-r--r--program/steps/settings/edit_prefs.inc9
-rw-r--r--program/steps/settings/func.inc19
-rw-r--r--skins/classic/mail.css1
-rw-r--r--skins/larry/addressbook.css5
-rw-r--r--skins/larry/settings.css20
-rw-r--r--skins/larry/styles.css7
-rw-r--r--skins/larry/templates/importcontacts.html2
-rw-r--r--skins/larry/ui.js13
18 files changed, 155 insertions, 39 deletions
diff --git a/CHANGELOG b/CHANGELOG
index dbc7447ae..85963d84f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Fix attachment icon issue when rare font/language is used (#1489326)
- After message is sent refresh messages list of replied message folder (#1489249)
- Add option force specified domain in user login - username_domain_forced (#1489264)
- Fix expanded thread root message styling after refreshing messages list (#1489327)
diff --git a/bin/updatedb.sh b/bin/updatedb.sh
index b4ed8b7ba..1f5e18434 100755
--- a/bin/updatedb.sh
+++ b/bin/updatedb.sh
@@ -72,13 +72,20 @@ if (!$version && $opts['version']) {
'0.2-alpha' => 2008040500,
'0.2-beta' => 2008060900,
'0.2-stable' => 2008092100,
+ '0.2.1' => 2008092100,
+ '0.2.2' => 2008092100,
'0.3-stable' => 2008092100,
'0.3.1' => 2009090400,
'0.4-beta' => 2009103100,
+ '0.4' => 2010042300,
+ '0.4.1' => 2010042300,
'0.4.2' => 2010042300,
'0.5-beta' => 2010100600,
'0.5' => 2010100600,
'0.5.1' => 2010100600,
+ '0.5.2' => 2010100600,
+ '0.5.3' => 2010100600,
+ '0.5.4' => 2010100600,
'0.6-beta' => 2011011200,
'0.6' => 2011011200,
'0.7-beta' => 2011092800,
diff --git a/plugins/newmail_notifier/config.inc.php.dist b/plugins/newmail_notifier/config.inc.php.dist
index cdb563c40..1a7c0d74f 100644
--- a/plugins/newmail_notifier/config.inc.php.dist
+++ b/plugins/newmail_notifier/config.inc.php.dist
@@ -9,4 +9,7 @@ $config['newmail_notifier_sound'] = false;
// Enables desktop notification
$config['newmail_notifier_desktop'] = false;
+// Desktop notification close timeout in seconds
+$config['newmail_notifier_desktop_timeout'] = 10;
+
?>
diff --git a/plugins/newmail_notifier/localization/en_US.inc b/plugins/newmail_notifier/localization/en_US.inc
index 7c1c5cf3f..1c4054615 100644
--- a/plugins/newmail_notifier/localization/en_US.inc
+++ b/plugins/newmail_notifier/localization/en_US.inc
@@ -25,5 +25,6 @@ $labels['body'] = 'You\'ve received a new message.';
$labels['testbody'] = 'This is a test notification.';
$labels['desktopdisabled'] = 'Desktop notifications are disabled in your browser.';
$labels['desktopunsupported'] = 'Your browser does not support desktop notifications.';
+$labels['desktoptimeout'] = 'Close desktop notification';
?>
diff --git a/plugins/newmail_notifier/newmail_notifier.js b/plugins/newmail_notifier/newmail_notifier.js
index b00f33d10..846bc94c3 100644
--- a/plugins/newmail_notifier/newmail_notifier.js
+++ b/plugins/newmail_notifier/newmail_notifier.js
@@ -90,13 +90,11 @@ function newmail_notifier_sound()
// - Require Chrome or Firefox latest version (22+) / 21.0 or older with a plugin
function newmail_notifier_desktop(body)
{
+ var timeout = rcmail.env.newmail_notifier_timeout || 10;
-/**
- * Fix: As of 17 June 2013, Chrome/Chromium does not implement Notification.permission correctly that
- * it gives 'undefined' until an object has been created:
- * https://code.google.com/p/chromium/issues/detail?id=163226
- *
- */
+ // As of 17 June 2013, Chrome/Chromium does not implement Notification.permission correctly that
+ // it gives 'undefined' until an object has been created:
+ // https://code.google.com/p/chromium/issues/detail?id=163226
try {
if (Notification.permission == 'granted' || Notification.permission == undefined) {
var popup = new Notification(rcmail.gettext('title', 'newmail_notifier'), {
@@ -109,7 +107,7 @@ function newmail_notifier_desktop(body)
popup.onclick = function() {
this.close();
}
- setTimeout(function() { popup.close(); }, 10000); // close after 10 seconds
+ setTimeout(function() { popup.close(); }, timeout * 1000);
if (popup.permission == 'granted') return true;
}
}
@@ -125,7 +123,7 @@ function newmail_notifier_desktop(body)
this.cancel();
}
popup.show();
- setTimeout(function() { popup.cancel(); }, 10000); // close after 10 seconds
+ setTimeout(function() { popup.cancel(); }, timeout * 1000);
rcmail.newmail_popup = popup;
return true;
}
diff --git a/plugins/newmail_notifier/newmail_notifier.php b/plugins/newmail_notifier/newmail_notifier.php
index ca1c2ff67..20c542f58 100644
--- a/plugins/newmail_notifier/newmail_notifier.php
+++ b/plugins/newmail_notifier/newmail_notifier.php
@@ -123,6 +123,23 @@ class newmail_notifier extends rcube_plugin
}
}
+ $type = 'desktop_timeout';
+ $key = 'newmail_notifier_' . $type;
+ if (!in_array($key, $dont_override)) {
+ $field_id = '_' . $key;
+ $select = new html_select(array('name' => $field_id, 'id' => $field_id));
+
+ foreach (array(5, 10, 15, 30, 45, 60) as $sec) {
+ $label = $this->rc->gettext(array('name' => 'afternseconds', 'vars' => array('n' => $sec)));
+ $select->add($label, $sec);
+ }
+
+ $args['blocks']['new_message']['options'][$key] = array(
+ 'title' => html::label($field_id, rcube::Q($this->gettext('desktoptimeout'))),
+ 'content' => $select->show((int) $this->rc->config->get($key))
+ );
+ }
+
return $args;
}
@@ -148,6 +165,13 @@ class newmail_notifier extends rcube_plugin
}
}
+ $option = 'newmail_notifier_desktop_timeout';
+ if (!in_array($option, $dont_override)) {
+ if ($value = (int) rcube_utils::get_input_value('_' . $option, rcube_utils::INPUT_POST)) {
+ $args['prefs'][$option] = $value;
+ }
+ }
+
return $args;
}
@@ -180,6 +204,7 @@ class newmail_notifier extends rcube_plugin
if ($unseen->count()) {
$this->notified = true;
+ $this->rc->output->set_env('newmail_notifier_timeout', $this->rc->config->get('newmail_notifier_desktop_timeout'));
$this->rc->output->command('plugin.newmail_notifier',
array(
'basic' => $this->opt['basic'],
diff --git a/plugins/newmail_notifier/package.xml b/plugins/newmail_notifier/package.xml
index b8ef34933..e46c9bc92 100644
--- a/plugins/newmail_notifier/package.xml
+++ b/plugins/newmail_notifier/package.xml
@@ -19,9 +19,9 @@
<email>alec@alec.pl</email>
<active>yes</active>
</lead>
- <date>2013-03-16</date>
+ <date>2013-09-12</date>
<version>
- <release>0.5</release>
+ <release>0.6</release>
<api>0.5</api>
</version>
<stability>
diff --git a/program/lib/Roundcube/rcube_config.php b/program/lib/Roundcube/rcube_config.php
index ac3ea678c..a3741758f 100644
--- a/program/lib/Roundcube/rcube_config.php
+++ b/program/lib/Roundcube/rcube_config.php
@@ -214,7 +214,7 @@ class rcube_config
$success = true;
}
// deprecated name of config variable
- else if (is_array($rcmail_config)) {
+ if (is_array($rcmail_config)) {
$this->merge($rcmail_config);
$success = true;
}
diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php
index 852070073..e66226ff5 100644
--- a/program/lib/Roundcube/rcube_db.php
+++ b/program/lib/Roundcube/rcube_db.php
@@ -386,17 +386,7 @@ class rcube_db
$result = $this->dbh->query($query);
if ($result === false) {
- $error = $this->dbh->errorInfo();
-
- if (empty($this->options['ignore_key_errors']) || $error[0] != '23000') {
- $this->db_error = true;
- $this->db_error_msg = sprintf('[%s] %s', $error[1], $error[2]);
-
- rcube::raise_error(array('code' => 500, 'type' => 'db',
- 'line' => __LINE__, 'file' => __FILE__,
- 'message' => $this->db_error_msg . " (SQL Query: $query)"
- ), true, false);
- }
+ $result = $this->handle_error($query);
}
$this->last_result = $result;
@@ -405,6 +395,30 @@ class rcube_db
}
/**
+ * Helper method to handle DB errors.
+ * This by default logs the error but could be overriden by a driver implementation
+ *
+ * @param string Query that triggered the error
+ * @return mixed Result to be stored and returned
+ */
+ protected function handle_error($query)
+ {
+ $error = $this->dbh->errorInfo();
+
+ if (empty($this->options['ignore_key_errors']) || $error[0] != '23000') {
+ $this->db_error = true;
+ $this->db_error_msg = sprintf('[%s] %s', $error[1], $error[2]);
+
+ rcube::raise_error(array('code' => 500, 'type' => 'db',
+ 'line' => __LINE__, 'file' => __FILE__,
+ 'message' => $this->db_error_msg . " (SQL Query: $query)"
+ ), true, false);
+ }
+
+ return false;
+ }
+
+ /**
* Get number of affected rows for the last query
*
* @param mixed $result Optional query handle
diff --git a/program/lib/Roundcube/rcube_db_mysql.php b/program/lib/Roundcube/rcube_db_mysql.php
index 6fa5ad768..24f9ce1bd 100644
--- a/program/lib/Roundcube/rcube_db_mysql.php
+++ b/program/lib/Roundcube/rcube_db_mysql.php
@@ -179,4 +179,29 @@ class rcube_db_mysql extends rcube_db
return isset($this->variables[$varname]) ? $this->variables[$varname] : $default;
}
+ /**
+ * Handle DB errors, re-issue the query on deadlock errors from InnoDB row-level locking
+ *
+ * @param string Query that triggered the error
+ * @return mixed Result to be stored and returned
+ */
+ protected function handle_error($query)
+ {
+ $error = $this->dbh->errorInfo();
+
+ // retry after "Deadlock found when trying to get lock" errors
+ $retries = 2;
+ while ($error[1] == 1213 && $retries >= 0) {
+ usleep(50000); // wait 50 ms
+ $result = $this->dbh->query($query);
+ if ($result !== false) {
+ return $result;
+ }
+ $error = $this->dbh->errorInfo();
+ $retries--;
+ }
+
+ return parent::handle_error($query);
+ }
+
}
diff --git a/program/steps/settings/edit_prefs.inc b/program/steps/settings/edit_prefs.inc
index 468e4994d..adf6b1623 100644
--- a/program/steps/settings/edit_prefs.inc
+++ b/program/steps/settings/edit_prefs.inc
@@ -40,24 +40,21 @@ function rcmail_user_prefs_form($attrib)
$out = $form_start;
- foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $block) {
+ foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $class => $block) {
if (!empty($block['options'])) {
$table = new html_table(array('cols' => 2));
foreach ($block['options'] as $option) {
- if ($option['advanced'])
- $table->set_row_attribs('advanced');
-
if (isset($option['title'])) {
$table->add('title', $option['title']);
- $table->add(null, $option['content']);
+ $table->add(null, $option['content']);
}
else {
$table->add(array('colspan' => 2), $option['content']);
}
}
- $out .= html::tag('fieldset', null, html::tag('legend', null, $block['name']) . $table->show($attrib));
+ $out .= html::tag('fieldset', $class, html::tag('legend', null, $block['name']) . $table->show($attrib));
}
else if (!empty($block['content'])) {
$out .= html::tag('fieldset', null, html::tag('legend', null, $block['name']) . $block['content']);
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index fdc07be9e..ecd35e94b 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -158,6 +158,7 @@ function rcmail_user_prefs($current = null)
'main' => array('name' => Q(rcube_label('mainoptions'))),
'skin' => array('name' => Q(rcube_label('skin'))),
'browser' => array('name' => Q(rcube_label('browseroptions'))),
+ 'advanced'=> array('name' => Q(rcube_label('advancedoptions'))),
);
// language selection
@@ -367,6 +368,7 @@ function rcmail_user_prefs($current = null)
$blocks = array(
'main' => array('name' => Q(rcube_label('mainoptions'))),
'new_message' => array('name' => Q(rcube_label('newmessage'))),
+ 'advanced' => array('name' => Q(rcube_label('advancedoptions'))),
);
// show config parameter for preview pane
@@ -488,6 +490,7 @@ function rcmail_user_prefs($current = null)
case 'mailview':
$blocks = array(
'main' => array('name' => Q(rcube_label('mainoptions'))),
+ 'advanced' => array('name' => Q(rcube_label('advancedoptions'))),
);
// show checkbox to open message view in new window
@@ -543,7 +546,7 @@ function rcmail_user_prefs($current = null)
$field_id = 'rcmfd_default_charset';
- $blocks['main']['options']['default_charset'] = array(
+ $blocks['advanced']['options']['default_charset'] = array(
'title' => html::label($field_id, Q(rcube_label('defaultcharset'))),
'content' => $RCMAIL->output->charset_selector(array(
'id' => $field_id, 'name' => '_default_charset', 'selected' => $config['default_charset']
@@ -605,6 +608,7 @@ function rcmail_user_prefs($current = null)
'main' => array('name' => Q(rcube_label('mainoptions'))),
'sig' => array('name' => Q(rcube_label('signatureoptions'))),
'spellcheck' => array('name' => Q(rcube_label('spellcheckoptions'))),
+ 'advanced' => array('name' => Q(rcube_label('advancedoptions'))),
);
// show checkbox to compose messages in a new window
@@ -673,8 +677,7 @@ function rcmail_user_prefs($current = null)
$select->add(rcube_label('miscfolding'), 1);
$select->add(rcube_label('2047folding'), 2);
- $blocks['main']['options']['mime_param_folding'] = array(
- 'advanced' => true,
+ $blocks['advanced']['options']['mime_param_folding'] = array(
'title' => html::label($field_id, Q(rcube_label('mimeparamfolding'))),
'content' => $select->show($config['mime_param_folding']),
);
@@ -688,8 +691,7 @@ function rcmail_user_prefs($current = null)
$field_id = 'rcmfd_force_7bit';
$input = new html_checkbox(array('name' => '_force_7bit', 'id' => $field_id, 'value' => 1));
- $blocks['main']['options']['force_7bit'] = array(
- 'advanced' => true,
+ $blocks['advanced']['options']['force_7bit'] = array(
'title' => html::label($field_id, Q(rcube_label('force7bit'))),
'content' => $input->show($config['force_7bit']?1:0),
);
@@ -866,7 +868,8 @@ function rcmail_user_prefs($current = null)
// Addressbook config
case 'addressbook':
$blocks = array(
- 'main' => array('name' => Q(rcube_label('mainoptions'))),
+ 'main' => array('name' => Q(rcube_label('mainoptions'))),
+ 'advanced' => array('name' => Q(rcube_label('advancedoptions'))),
);
if (!isset($no_override['default_addressbook'])
@@ -962,7 +965,8 @@ function rcmail_user_prefs($current = null)
// Special IMAP folders
case 'folders':
$blocks = array(
- 'main' => array('name' => Q(rcube_label('mainoptions'))),
+ 'main' => array('name' => Q(rcube_label('mainoptions'))),
+ 'advanced' => array('name' => Q(rcube_label('advancedoptions'))),
);
if (!isset($no_override['show_real_foldernames'])) {
@@ -1043,6 +1047,7 @@ function rcmail_user_prefs($current = null)
$blocks = array(
'main' => array('name' => Q(rcube_label('mainoptions'))),
'maintenance' => array('name' => Q(rcube_label('maintenance'))),
+ 'advanced' => array('name' => Q(rcube_label('advancedoptions'))),
);
if (!isset($no_override['read_when_deleted'])) {
diff --git a/skins/classic/mail.css b/skins/classic/mail.css
index b8cc9f351..f712069be 100644
--- a/skins/classic/mail.css
+++ b/skins/classic/mail.css
@@ -1592,6 +1592,7 @@ input.from_address
#compose-attachments ul li
{
height: 18px;
+ line-height: 16px;
font-size: 11px;
padding-left: 2px;
padding-top: 2px;
diff --git a/skins/larry/addressbook.css b/skins/larry/addressbook.css
index 6bf9426c4..39d0cce21 100644
--- a/skins/larry/addressbook.css
+++ b/skins/larry/addressbook.css
@@ -387,3 +387,8 @@ a.deletebutton {
overflow: auto;
padding: 10px;
}
+
+#import-box p,
+#import-box .propform {
+ max-width: 50em;
+}
diff --git a/skins/larry/settings.css b/skins/larry/settings.css
index 59037ac76..6afa48c40 100644
--- a/skins/larry/settings.css
+++ b/skins/larry/settings.css
@@ -48,6 +48,26 @@
border-radius: 4px 4px 0 0;
}
+#preferences-details fieldset.advanced legend {
+ position: relative;
+ display: block;
+ width: 100%;
+ cursor: pointer;
+}
+
+#preferences-details fieldset.advanced .propform {
+ display: none;
+}
+
+#preferences-details fieldset.advanced .advanced-toggle {
+ position: absolute;
+ top: 2px;
+ right: 6px;
+ text-decoration: none;
+ color: #666;
+ font-size: 11px;
+}
+
#sections-table tbody td.section,
#settings-sections span.listitem a,
#settings-sections span.tablink a {
diff --git a/skins/larry/styles.css b/skins/larry/styles.css
index d542768b7..4b238c163 100644
--- a/skins/larry/styles.css
+++ b/skins/larry/styles.css
@@ -2292,12 +2292,13 @@ ul.toolbarmenu li span.conversation {
display: block;
color: #333;
font-weight: bold;
- padding: 8px 15px 3px 30px;
+ padding: 3px 15px 3px 30px;
text-shadow: 0px 1px 1px #fff;
text-decoration: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
+ line-height: 20px;
}
.attachmentslist li a.drop {
@@ -2326,9 +2327,9 @@ ul.toolbarmenu li span.conversation {
.attachmentslist li a.delete,
.attachmentslist li a.cancelupload {
position: absolute;
- top: 6px;
+ top: 4px;
right: 0;
- width: 24px;
+ width: 20px;
height: 18px;
padding: 0;
text-decoration: none;
diff --git a/skins/larry/templates/importcontacts.html b/skins/larry/templates/importcontacts.html
index d3d0f2b93..69b138b9a 100644
--- a/skins/larry/templates/importcontacts.html
+++ b/skins/larry/templates/importcontacts.html
@@ -18,7 +18,7 @@
<h2 class="boxtitle"><roundcube:label name="importcontacts" /></h2>
<div id="import-box" class="boxcontent">
-<roundcube:object name="importstep" />
+<roundcube:object name="importstep" class="propform" />
<br/>
<p class="formbuttons">
<roundcube:object name="importnav" class="button" />
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index ae14d81b2..d558f16a2 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -195,6 +195,19 @@ function rcube_mail_ui()
new rcube_splitter({ id:'prefviewsplitter', p1:'#sectionslist', p2:'#preferences-box',
orientation:'v', relative:true, start:266, min:180, size:12 }).init();
}
+ else if (rcmail.env.action == 'edit-prefs') {
+ $('<a href="#toggle">&#9660;</a>')
+ .addClass('advanced-toggle')
+ .appendTo('#preferences-details fieldset.advanced legend');
+
+ $('#preferences-details fieldset.advanced legend').click(function(e){
+ var collapsed = $(this).hasClass('collapsed'),
+ toggle = $('.advanced-toggle', this).html(collapsed ? '&#9650;' : '&#9660;');
+ $(this)
+ .toggleClass('collapsed')
+ .closest('fieldset').children('.propform').toggle()
+ }).addClass('collapsed')
+ }
}
/*** addressbook task ***/
else if (rcmail.env.task == 'addressbook') {