Bläddra i källkod

Couple warnings removed
If subject line is over 55 chars, trims it and appends "..."

Tyler Akins 24 år sedan
förälder
incheckning
505cf3de89
2 ändrade filer med 9 tillägg och 9 borttagningar
  1. 2 8
      functions/imap_mailbox.php
  2. 7 1
      functions/mailbox_display.php

+ 2 - 8
functions/imap_mailbox.php

@@ -163,13 +163,7 @@
       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.
@@ -210,7 +204,7 @@
       }
       $sorted_lsub_ary = $new_ary;
       if (isset($sorted_lsub_ary)) {
-         usort($sorted_lsub_ary, "_icmp");
+         usort($sorted_lsub_ary, "strcasecmp");
          //sort($sorted_lsub_ary);
       }   
 

+ 7 - 1
functions/mailbox_display.php

@@ -112,7 +112,12 @@
 	           $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;
@@ -427,6 +432,7 @@
          $i = $startMessage;
 
          reset($msort);
+	 $k = 0;
          do {
             $key = key($msort);
             next($msort);