fix duplicate htmlspecialchars of $sTmp; this comes straight from
[squirrelmail.git] / functions / imap_messages.php
index 19ce2d7f006d67dc626e5162d975b18e476d871b..32c2e7dc1d6bac14d2482407f7483bb7c1fb2848 100755 (executable)
@@ -231,7 +231,9 @@ function get_squirrel_sort($imap_stream, $sSortField, $reverse = false, $aUid =
 
     // sqimap_get_small_header (see above) returns fields in lower case,
     // but the code below uses all upper case
-    foreach ($msgs as $k => $v) $msgs[$k][strtoupper($sSortField)] = $msgs[$k][strtolower($sSortField)];
+    foreach ($msgs as $k => $v) 
+        if (isset($msgs[$k][strtolower($sSortField)])) 
+            $msgs[$k][strtoupper($sSortField)] = $msgs[$k][strtolower($sSortField)];
 
     $aUid = array();
     $walk = false;
@@ -714,7 +716,7 @@ function parseFetch(&$aResponse,$aMessageList = array()) {
                                         if  (is_numeric($sPrio)) {
                                             $iPrio = (int) $sPrio;
                                         } elseif ( $sPrio == 'non-urgent' || $sPrio == 'low' ) {
-                                            $iPrio = 3;
+                                            $iPrio = 5;
                                         } elseif ( $sPrio == 'urgent' || $sPrio == 'high' ) {
                                             $iPrio = 1;
                                         } else {