From ade8e117dfbb62f6dbd16b4aca81dfbdbd054579 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 02 Sep 2008 03:42:46 -0400
Subject: [PATCH] Let rcmail class create address book instances
---
program/include/rcube_imap.php | 29 +++++++++--------------------
1 files changed, 9 insertions(+), 20 deletions(-)
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 3daea0c..922b15e 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -81,17 +81,6 @@
/**
- * PHP 4 object constructor
- *
- * @see rcube_imap::__construct
- */
- function rcube_imap($db_conn)
- {
- $this->__construct($db_conn);
- }
-
-
- /**
* Connect to an IMAP server
*
* @param string Host to connect
@@ -2539,19 +2528,19 @@
$folders = array_merge($a_defaults, array_keys($folders));
// finally we must rebuild the list to move
- // subfolders of default folders to their place
+ // subfolders of default folders to their place...
+ // ...also do this for the rest of folders because
+ // asort() is not properly sorting case sensitive names
while (list($key, $folder) = each($folders)) {
$a_out[] = $folder;
unset($folders[$key]);
- if (in_array(strtolower($folder), $this->default_folders_lc)) {
- foreach ($folders as $idx => $f) {
- if (strpos($f, $folder.$delimiter) === 0) {
- $a_out[] = $f;
- unset($folders[$idx]);
- }
+ foreach ($folders as $idx => $f) {
+ if (strpos($f, $folder.$delimiter) === 0) {
+ $a_out[] = $f;
+ unset($folders[$idx]);
}
- reset($folders);
- }
+ }
+ reset($folders);
}
return $a_out;
--
Gitblit v1.9.1