added CHARSET option to searching.. should fix the german character
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 19 Sep 2000 21:46:22 +0000 (21:46 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 19 Sep 2000 21:46:22 +0000 (21:46 +0000)
problem.  Please test it out.  It takes the charset from your current
language.

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

functions/imap_general.php
functions/imap_search.php
functions/mailbox_display.php
src/left_main.php
src/search.php

index a9682dae314810fa6c1d50bb385a7d36bfd806a5..0d8839665a01734c226206f9f35c85014d547098 100755 (executable)
    function sqimap_read_data ($imap_stream, $pre, $handle_errors, $response, $message) {
       global $color;
 
+      //$imap_general_debug = true;
+      $imap_general_debug = false;
+
       $read = fgets ($imap_stream, 1024);
-//             echo "<small><tt><font color=cc0000>$read</font></tt></small><br>";
+               if ($imap_general_debug) echo "<small><tt><font color=cc0000>$read</font></tt></small><br>";
       $counter = 0;
       while ((substr($read, 0, strlen("$pre OK")) != "$pre OK") &&
              (substr($read, 0, strlen("$pre BAD")) != "$pre BAD") &&
              (substr($read, 0, strlen("$pre NO")) != "$pre NO")) {
          $data[$counter] = $read;
          $read = fgets ($imap_stream, 1024);
-//                     echo "<small><tt><font color=cc0000>$read</font></tt></small><br>";
+                       if ($imap_general_debug) echo "<small><tt><font color=cc0000>$read</font></tt></small><br>";
          $counter++;
       }       
-//      echo "--<br>";
+      if ($imap_general_debug) echo "--<br>";
       if (substr($read, 0, strlen("$pre OK")) == "$pre OK") {
          $response = "OK";
          $message = trim(substr($read, strlen("$pre OK"), strlen($read)));
index 1b42a98df5934c442b201d5974da433ad0126b1e..667c795a415f02bb7b5a38ebc524df478fc2d52e 100644 (file)
    $imap_search_php = true;
 
 function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$color) {
-   global $msgs, $message_highlight_list;
+   global $msgs, $message_highlight_list, $squirrelmail_language, $languages;
    $urlMailbox = urlencode($mailbox);
    
    # Construct the Search QuERY
    
-   $ss = "a001 SEARCH ALL $search_where \"$search_what\"\r\n";
+   if ($languages[$squirrelmail_language]["CHARSET"]) {
+      $ss = "a001 SEARCH CHARSET ".$languages[$squirrelmail_language]["CHARSET"]." ALL $search_where \"$search_what\"\r\n";
+   } else {
+      $ss = "a001 SEARCH ALL $search_where \"$search_what\"\r\n";
+   }
    fputs($imapConnection,$ss);
 
    # Read Data Back From IMAP
index 87074a06d388b1e58d4228144824e9eb651d0902..e4d3c6816d33eb1502c9d31f175e74fec830a8ab 100644 (file)
       global $msgs, $msort;
                global $sent_folder;
       global $message_highlight_list;
+      global $auto_expunge;
+
+      if ($auto_expunge) {
+         sqimap_mailbox_expunge($imapConnection, $mailbox);
+         sqimap_mailbox_select($imapConnection, $mailbox);
+      }
 
       if (!$use_cache) {
          if ($numMessages >= 1) {
index 39382ea096619b015c5099d110c3991845a2884d..aff3083044c434451340029bb22506b9e9beef8d 100644 (file)
@@ -40,7 +40,6 @@
 
    displayHtmlHeader();
 
-
    function formatMailboxName($imapConnection, $mailbox, $real_box, $delimeter, $unseen) {
                global $folder_prefix, $trash_folder, $sent_folder;
                global $color, $move_to_sent, $move_to_trash;
             $line .= replace_spaces(readShortMailboxName($mailbox, $delimeter));
             $line .= "</FONT>";
          } else {
+            if ($auto_expunge) {
+               sqimap_mailbox_expunge($imapConnection, $boxes[$i]["unformatted-dm"]);
+            }
             $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $boxes[$i]["unseen"]);
          }
       } else {
index 1db642f11397eed075ca90c2eec6d3a5498e8b77..f5b4798db4f8d69959373032f9cd97e502a1879a 100644 (file)
@@ -10,6 +10,8 @@
       exit;
    }
 
+   if (!isset($i18n_php))
+      include("../functions/i18n.php");
    if (!isset($config_php))
       include("../config/config.php");
    if (!isset($strings_php))