浏览代码

- added patch from srakhada that uses quotemeta() function around password to allow
special characters in password.
- added patch from dave_michmerhuizen@yahoo.com to do folder sorting with case insensativity

Luke Ehresman 25 年之前
父节点
当前提交
424c8c1f31
共有 3 个文件被更改,包括 11 次插入2 次删除
  1. 1 0
      ChangeLog
  2. 9 1
      functions/imap_mailbox.php
  3. 1 1
      src/webmail.php

+ 1 - 0
ChangeLog

@@ -1,5 +1,6 @@
 Version 1.0pre1 -- DEVELOPMENT
 ------------------------------
+- Folder sorting now case insensative
 - added config option to set IMAP folder delimiter rather than always detecting it
 - Made session cookie parameter use PHP's settings rather than making assumptions
 - Select/Deslect all implemented using only HTML (not Javascript)

+ 9 - 1
functions/imap_mailbox.php

@@ -140,6 +140,13 @@
       }
       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.
@@ -177,7 +184,8 @@
       }
       $sorted_lsub_ary = $new_ary;
       if (isset($sorted_lsub_ary)) {
-         sort($sorted_lsub_ary);
+			usort($sorted_lsub_ary, "_icmp");
+         //sort($sorted_lsub_ary);
       }   
 
       /** LIST array **/

+ 1 - 1
src/webmail.php

@@ -54,7 +54,7 @@
       do_hook ("login_before");
 
       $onetimepad = OneTimePadCreate(strlen($secretkey));
-      $key = OneTimePadEncrypt($secretkey, $onetimepad);
+      $key = OneTimePadEncrypt(quotemeta($secretkey), $onetimepad);
       session_register("onetimepad");
       // verify that username and password are correct
       $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);