Couple warnings removed
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 30 Jan 2001 18:11:09 +0000 (18:11 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 30 Jan 2001 18:11:09 +0000 (18:11 +0000)
If subject line is over 55 chars, trims it and appends "..."

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@986 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php
functions/mailbox_display.php

index 72666d72e7447db230a6674c6198392f6b24af84..dad18801348fbd2066cf39b9591636f6f0782302 100755 (executable)
       return $boxes;
    }
 
-   /* patch from dave_michmerhuizen@yahoo.com
-    * allows case insensativity when sorting folders
-    */
-   function _icmp ($a, $b) {
-      return strcasecmp($a, $b);
-   }
-   
+
    /******************************************************************************
     **  Returns sorted mailbox lists in several different ways.
     **  See comment on sqimap_mailbox_parse() for info about the returned array.
       }
       $sorted_lsub_ary = $new_ary;
       if (isset($sorted_lsub_ary)) {
-         usort($sorted_lsub_ary, "_icmp");
+         usort($sorted_lsub_ary, "strcasecmp");
          //sort($sorted_lsub_ary);
       }   
 
index d35acce3a5ee9848c1f36efb241f0bc68eeed51b..6b74424ba307122f10304b090d0e5f5f82d52563 100644 (file)
                   $search_stuff = "";
               echo "<a href=\"read_body.php?mailbox=$urlMailbox&passed_id=".$msg["ID"]."&startMessage=$startMessage&show_more=0$search_stuff\"";
               do_hook("subject_link");
-              echo ">$flag$subject$flag_end</a>$bold_end</td>\n";
+              echo ">$flag";
+              if (strlen($subject) > 55)
+                  echo substr($subject, 0, 50) . "...";
+              else
+                  echo $subject;
+              echo "$flag_end</a>$bold_end</td>\n";
                break;
             case 5: # flags
                $stuff = false;
          $i = $startMessage;
 
          reset($msort);
+        $k = 0;
          do {
             $key = key($msort);
             next($msort);