- changed checkbox text to 'As Attachment' improve understanding
[squirrelmail.git] / functions / imap_search.php
index d7b1924b46ceacdd9c11b85f7e433f5d73124c4f..05cf2edde7916440c69e74355979d9585a2f70ba 100644 (file)
@@ -3,17 +3,20 @@
 /**
  * imap_search.php
  *
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2004 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * IMAP search routines
  *
  * $Id$
+ * @package squirrelmail
+ * @deprecated This search interface has been largely replaced by asearch
  */
 
+/**
+ * Load up a bunch of SM functions */
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/date.php');
-require_once(SM_PATH . 'functions/array.php');
 require_once(SM_PATH . 'functions/mailbox_display.php');
 require_once(SM_PATH . 'functions/mime.php');
 
@@ -21,7 +24,7 @@ function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
                        $color, $search_position = '', $search_all, $count_all) {
 
     global $message_highlight_list, $squirrelmail_language, $languages,
-           $index_order, $pos, $allow_charset_search, $uid_support,
+           $index_order, $pos, $allow_charset_search, 
           $imap_server_type;
 
     $pos = $search_position;
@@ -74,7 +77,7 @@ function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
     }
 
     /* read data back from IMAP */
-    $readin = sqimap_run_command($imapConnection, $ss, false, $result, $message, $uid_support);
+    $readin = sqimap_run_command($imapConnection, $ss, false, $result, $message, TRUE);
 
     /* try US-ASCII charset if search fails */
     if (isset($languages[$squirrelmail_language]['CHARSET']) 
@@ -103,7 +106,7 @@ function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
         if (strstr($errors,'* SEARCH')) {
             return array();
         }
-        echo "<!-- $errors -->";
+        echo '<!-- '.htmlspecialchars($errors) .' -->';
     }