summaryrefslogtreecommitdiff
path: root/program/steps/mail/func.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r--program/steps/mail/func.inc21
1 files changed, 16 insertions, 5 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index c18d2cd13..47d1a484a 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -374,6 +374,8 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null
*/
function rcmail_message_list_head($attrib, $a_show_cols)
{
+ global $RCMAIL;
+
$skin_path = $_SESSION['skin_path'];
$image_tag = html::img(array('src' => "%s%s", 'alt' => "%s"));
@@ -381,8 +383,18 @@ function rcmail_message_list_head($attrib, $a_show_cols)
$sort_col = $_SESSION['sort_col'];
$sort_order = $_SESSION['sort_order'];
+ $dont_override = (array)$RCMAIL->config->get('dont_override');
+ $disabled_sort = in_array('message_sort_col', $dont_override);
+ $disabled_order = in_array('message_sort_order', $dont_override);
+
+ $RCMAIL->output->set_env('disabled_sort_col', $disabled_sort);
+ $RCMAIL->output->set_env('disabled_sort_order', $disabled_order);
+
// define sortable columns
- $a_sort_cols = array('subject', 'date', 'from', 'to', 'fromto', 'size', 'cc');
+ if ($disabled_sort)
+ $a_sort_cols = $sort_col && !$disabled_order ? array($sort_col) : array();
+ else
+ $a_sort_cols = array('subject', 'date', 'from', 'to', 'fromto', 'size', 'cc');
if (!empty($attrib['optionsmenuicon'])) {
$onclick = 'return ' . JS_OBJECT_NAME . ".command('menu-open', 'messagelistmenu')";
@@ -432,7 +444,7 @@ function rcmail_message_list_head($attrib, $a_show_cols)
else if ($col_name[0] != '<')
$col_name = '<span class="' . $col .'">' . $col_name . '</span>';
- $sort_class = $col == $sort_col ? " sorted$sort_order" : '';
+ $sort_class = $col == $sort_col && !$disabled_order ? " sorted$sort_order" : '';
$class_name = $col.$sort_class;
// put it all together
@@ -779,9 +791,8 @@ function rcmail_plain_body($body, $flowed=false)
// make links and email-addresses clickable
$replacer = new rcube_string_replacer;
- // search for patterns like links and e-mail addresses
- $body = preg_replace_callback($replacer->link_pattern, array($replacer, 'link_callback'), $body);
- $body = preg_replace_callback($replacer->mailto_pattern, array($replacer, 'mailto_callback'), $body);
+ // search for patterns like links and e-mail addresses and replace with tokens
+ $body = $replacer->replace($body);
// split body into single lines
$body = preg_split('/\r?\n/', $body);