fixed problem with usort getting bad data in some instances
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 4 May 2000 20:59:39 +0000 (20:59 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 4 May 2000 20:59:39 +0000 (20:59 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@489 7612ce4b-ef26-0410-bec9-ea0150e637f0

config/conf.pl
functions/imap_mailbox.php
functions/mailbox_display.php

index 8d792876df29c351086964a9a3808fe6cfc7a378..7a3215236cb3862ed1e2f1c13a171e83996b0e83 100755 (executable)
@@ -1091,12 +1091,11 @@ sub command61 {
 }   
 
 sub command62 {
-   print "Although our project goals stated that we would stay 100% HTML with\n";
-   print "no javascript, some of our developers have developed a wonderful\n";
-   print "javascript interface for searching for email addresses in your address\n";
-   print "books.  In order to stick with our project goals, and without having\n";
-   print "to refuse their work, we also developed an HTML version of address\n";
-   print "book searching.\n";
+   print "Some of our developers have come up with very good javascript interface\n";
+   print "for searching through address books, however, our original goals said\n";
+   print "that we would be 100% HTML.  In order to make it possible to use their\n";
+   print "interface, and yet stick with our goals, we have also written a plain\n";
+   print "HTML version of the search.  Here, you can choose which version to use.\n";
    print "\n";
    print "This is just the default value.  It is also a user option that each\n";
    print "user can configure individually\n";
index 4cf6e3a69b54d22805165f8fa8fdab9954ff5968..39e17d968ffe50a799dfebff12ea2c26e0212573 100755 (executable)
       if ($inbox_subscribed == false || $inbox_in_list == false) {
          fputs ($imap_stream, "a001 LIST \"\" \"INBOX\"\r\n");
          $inbox_ary = sqimap_read_data ($imap_stream, "a001", true, $response, $message);
-         $sorted_list_ary[count($sorted_list_ary)] = $inbox_ary[0];
+
+         $pos = count($sorted_list_ary);
+         $sorted_list_ary[$pos] = $inbox_ary[0];
+
+         $pos = count($sorted_lsub_ary);
+         $sorted_lsub_ary[$pos] = find_mailbox_name($inbox_ary[0]);
       }
 
                $boxes = sqimap_mailbox_parse ($sorted_list_ary, $sorted_lsub_ary, $dm);
          }
          $g++;
       }
-      $boxes = ary_sort ($boxes, "unformatted", 1);
+      if ($boxes) {
+         $boxes = ary_sort ($boxes, "unformatted", 1);
+      }
       return $boxes;
    }
    
index c5b304b1747dbdce161a30ed21a09b61c7b49093..8ffb15e62ce9c6a24f16e542fe057ab2b3f8d063 100644 (file)
          echo "<A HREF=\"right_main.php?use_mailbox_cache=1&startMessage=$nextGroup&mailbox=$urlMailbox\" TARGET=\"right\">" . _("Next") . "</A>\n";
       }
       echo "</TD></TR></TABLE>"; /** End of message-list table */
+
    }
 ?>