From f3b659935f3386c077746cd7a84770532ed0ec50 Mon Sep 17 00:00:00 2001 From: thomascube Date: Sun, 23 Oct 2005 14:39:09 +0000 Subject: Added patches for default language and sorting function --- program/lib/imap.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'program/lib') diff --git a/program/lib/imap.inc b/program/lib/imap.inc index 3d37bed17..fc5ff09d7 100644 --- a/program/lib/imap.inc +++ b/program/lib/imap.inc @@ -52,6 +52,7 @@ class iilConnection{ var $recent; var $rootdir; var $delimiter; + var $capability = array(); } class iilBasicHeader{ @@ -246,6 +247,9 @@ function iil_ParseNamespace2($str, &$i, $len=0, $l){ function iil_C_NameSpace(&$conn){ global $my_prefs; + if (!in_array('NAMESPACE', $conn->capability)) + return false; + if ($my_prefs["rootdir"]) return true; fputs($conn->fp, "ns1 NAMESPACE\r\n"); @@ -334,7 +338,7 @@ function iil_Connect($host, $user, $password){ $iil_error.="Socket connection established\r\n"; $line=iil_ReadLine($conn->fp, 300); - + if (strcasecmp($auth_method, "check")==0){ //check for supported auth methods @@ -349,6 +353,8 @@ function iil_Connect($host, $user, $password){ $a = explode(" ", $line); if ($line[0]=="*"){ while ( list($k, $w) = each($a) ){ + if ($w!='*' && $w!='CAPABILITY') + $conn->capability[] = $w; if ((strcasecmp($w, "AUTH=CRAM_MD5")==0)|| (strcasecmp($w, "AUTH=CRAM-MD5")==0)){ $auth_method = "auth"; -- cgit v1.2.3