Be smarter with PHP numerical conversion, who knows if the previous code wouldn't...
authoralex-brainstorm <alex-brainstorm@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 30 Apr 2004 23:18:18 +0000 (23:18 +0000)
committeralex-brainstorm <alex-brainstorm@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 30 Apr 2004 23:18:18 +0000 (23:18 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7334 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_asearch.php

index 48ce5eadb566051165c4148c8d321500eddf1c0f..be0b15f0c238a3e50eed988a959d2f7014785691 100644 (file)
@@ -274,13 +274,13 @@ function sqimap_asearch_build_criteria($opcode, $what, $charset)
                        if ($what != '') {
                                switch (substr($what, -1)) {
                                        case 'G':
-                                               $what <<= 10;
-                                       //nobreak;
+                                               $what = substr($what, 0, -1) << 30;
+                                       break;
                                        case 'M':
-                                               $what <<= 10;
-                                       //nobreak;
+                                               $what = substr($what, 0, -1) << 20;
+                                       break;
                                        case 'K':
-                                               $what <<= 10;
+                                               $what = substr($what, 0, -1) << 10;
                                        break;
                                }
                                $criteria = $opcode . ' ' . $what . ' ';