From: pdontthink Date: Mon, 8 Jan 2007 19:09:01 +0000 (+0000) Subject: Give threading URI to template, let template do the HTML layout X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=cd693cf42cd1a7b71ed75f6d72811a33d3e068ca Give threading URI to template, let template do the HTML layout git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12102 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 625d48a7..c9860e35 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -987,11 +987,11 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) { $thread_name = _("Thread View"); $newsort = $aMailbox['SORT'] + SQSORT_THREAD; } - $thread_link_str = '[' . $thread_name - . ']'; + $thread_link_uri = $baseurl . '&srt=' . $newsort + . '&startMessage=1'; } else { - $thread_link_str =''; + $thread_link_uri =''; + $thread_name = ''; } $sort = $aMailbox['SORT']; @@ -1151,7 +1151,8 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) { $aTemplate['trash_folder'] = $trash_folder; $aTemplate['sent_folder'] = $sent_folder; $aTemplate['draft_folder'] = $draft_folder; - $aTemplate['thread_link_str'] = $thread_link_str; + $aTemplate['thread_link_uri'] = $thread_link_uri; + $aTemplate['thread_name'] = $thread_name; $aTemplate['php_self'] = str_replace('&','&',$php_self); $aTemplate['mailbox'] = $sMailbox; //FIXME: javascript_on is always assigned to the template object in places like init.php; is there some reason to reassign it here? is there some chance that it was changed? if not, please remove this line! diff --git a/templates/default/message_list.tpl b/templates/default/message_list.tpl index 81c221e7..afe49e4f 100644 --- a/templates/default/message_list.tpl +++ b/templates/default/message_list.tpl @@ -49,7 +49,8 @@ * $trash_folder * $sent_folder * $draft_folder - * $thread_link_str + * $thread_link_uri + * $thread_name * $php_self * $mailbox * $enablesort @@ -131,7 +132,8 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16]; * $this is the Template class object. */ $paginator_str = $this->fetch('paginator.tpl'); - echo $paginator_str . $thread_link_str ."\n"; ?> + echo $paginator_str . '[' . $thread_name . ']'; ?> diff --git a/templates/default/message_list_controls.tpl b/templates/default/message_list_controls.tpl index bd650ed2..5ca52d9f 100644 --- a/templates/default/message_list_controls.tpl +++ b/templates/default/message_list_controls.tpl @@ -49,7 +49,8 @@ * $trash_folder * $sent_folder * $draft_folder - * $thread_link_str + * $thread_link_uri + * $thread_name * $php_self * $mailbox * $enablesort