UW response will now be detected too
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 10 Feb 2006 19:02:28 +0000 (19:02 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 10 Feb 2006 19:02:28 +0000 (19:02 +0000)
[BADCHARSET (US-ASCII ,,,, )]

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10687 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_messages.php

index a964e6c..8520b5a 100755 (executable)
@@ -166,7 +166,7 @@ function sqimap_get_sort_order($imap_stream, $sSortField, $reverse, $search='ALL
         $aData = sqimap_run_command_list ($imap_stream, $query, false, $response, $message, TRUE);
         /* fallback to default charset */
         if ($response == 'NO') {
-            if (strpos($message,'[BADCHARSET]') !== false ||
+            if (strpos($message,'BADCHARSET') !== false ||
                 strpos($message,'character') !== false) {
                 sqm_trigger_imap_error('SQM_IMAP_BADCHARSET',$query, $response, $message);
                 $query = "SORT ($sSortField) US-ASCII $search";
@@ -440,7 +440,7 @@ function get_thread_sort($imap_stream, $search='ALL') {
     /* fallback to default charset */
 
     if ($response == 'NO') {
-        if (strpos($message,'[BADCHARSET]') !== false ||
+        if (strpos($message,'BADCHARSET') !== false ||
             strpos($message,'character') !== false) {
             sqm_trigger_imap_error('SQM_IMAP_BADCHARSET',$query, $response, $message);
             $query = "THREAD $sort_type US-ASCII $search";