[prev in list] [next in list] [prev in thread] [next in thread]
List: squirrelmail-cvs
Subject: [SM-CVS] SF.net SVN: squirrelmail:[14103]
From: pdontthink () users ! sourceforge ! net
Date: 2011-04-18 18:42:49
Message-ID: E1QBtPN-0002Lr-As () sfp-svn-4 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 14103
http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=14103&view=rev
Author: pdontthink
Date: 2011-04-18 18:42:49 +0000 (Mon, 18 Apr 2011)
Log Message:
-----------
Make speed enhancements to threaded message display (thanks to Siim Poder) (#3288123)
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog
branches/SM-1_4-STABLE/squirrelmail/functions/imap_messages.php
Modified: branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog 2011-04-18 00:17:51 UTC (rev \
14102)
+++ branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog 2011-04-18 18:42:49 UTC (rev \
14103) @@ -24,10 +24,12 @@
(core support for such is not new).
- Gmail doens't support standard search commands; removed sort buttons.
- Forced addition of a file suffix to attachments that lack a filename
- (helps forwarded messages avoid spam filters) (Thanks to Petr
+ (helps forwarded messages avoid spam filters) (thanks to Petr
Kletecka) (#3139004).
- Fixed missing security token in listcommands plugin.
- - Added smtp_auth hook (Thanks to Emmanuel Dreyfus).
+ - Added smtp_auth hook (thanks to Emmanuel Dreyfus).
+ - Made speed enhancements to threaded message display (thanks to Siim
+ Poder) (#3288123).
Version 1.4.21 - 23 Jul 2010
----------------------------
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/imap_messages.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/imap_messages.php 2011-04-18 \
00:17:51 UTC (rev 14102)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/imap_messages.php 2011-04-18 \
18:42:49 UTC (rev 14103) @@ -271,28 +271,33 @@
* Returns an indent array for printMessageinfo()
* This represents the amount of indent needed (value),
* for this message number (key)
+ *
+ * @param resource $imap_stream
+ * @return array message ID to indent level mappings
*/
function get_parent_level($imap_stream) {
- global $sort_by_ref, $default_charset, $thread_new;
- $parent = "";
- $child = "";
- $cutoff = 0;
+ global $thread_new;
+ $parent = "";
+ $child = "";
+ $cutoff = 0;
+ $indent_array = array();
+ if (!$thread_new) {
+ $thread_new = array();
+ }
+
/* loop through the threads and take unwanted characters out
of the thread string then chop it up
*/
- for ($i=0;$i<count($thread_new);$i++) {
+ $thread_count = count($thread_new);
+ for ($i = 0; $i < $thread_count; $i++) {
$thread_new[$i] = preg_replace("/\s\(/", "(", $thread_new[$i]);
$thread_new[$i] = preg_replace("/(\d+)/", "$1|", $thread_new[$i]);
$thread_new[$i] = preg_split("/\|/", $thread_new[$i], -1, \
PREG_SPLIT_NO_EMPTY); }
- $indent_array = array();
- if (!$thread_new) {
- $thread_new = array();
- }
+
/* looping through the parts of one message thread */
-
- for ($i=0;$i<count($thread_new);$i++) {
+ for ($i = 0; $i < $thread_count; $i++) {
/* first grab the parent, it does not indent */
if (isset($thread_new[$i][0])) {
@@ -312,7 +317,8 @@
$spaces_total = 0;
$indent = 0;
$fake = FALSE;
- for ($k=1;$k<(count($thread_new[$i]))-1;$k++) {
+ $thread_length = count($thread_new[$i]);
+ for ($k=1;$k<$thread_length-1;$k++) {
$chars = count_chars($thread_new[$i][$k], 1);
if (isset($chars['40'])) { /* testing for ( */
$level += $chars['40'];
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
-----
squirrelmail-cvs mailing list
List address: squirrelmail-cvs@lists.sourceforge.net
List info (subscribe/unsubscribe/change options): \
https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
Repository: http://squirrelmail.org/svn
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic