From ded2b7e166d4b0acab09c00f22f379fbabba709a Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 05 May 2006 12:53:21 -0400
Subject: [PATCH] Changed login page title regarding product name (Bug #1476413)

---
 program/include/rcube_imap.inc |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index c818fa0..30e6eb8 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -55,7 +55,7 @@
   var $default_folders = array('inbox', 'drafts', 'sent', 'junk', 'trash');
   var $cache = array();
   var $cache_keys = array();  
-  var $cache_changes = array();  
+  var $cache_changes = array();
   var $uid_id_map = array();
   var $msg_headers = array();
   var $capabilities = array();
@@ -856,7 +856,7 @@
     $mailbox = $mbox ? $this->_mod_mailbox($mbox) : $this->mailbox;
     if ($str && $criteria)
       {
-      $criteria .= " \"$str\"";
+      $criteria .= ' CHARSET UTF-8 "'.UTF7EncodeString($str).'"';
       return $this->_search_index($mailbox, $criteria);
       }
     else
@@ -934,18 +934,21 @@
 
 
   // set message flag to one or several messages
-  // possible flgs are: SEEN, DELETED, RECENT, ANSWERED, DRAFT
+  // possible flags are: SEEN, UNDELETED, DELETED, RECENT, ANSWERED, DRAFT
   function set_flag($uids, $flag)
     {
     $flag = strtoupper($flag);
     $msg_ids = array();
     if (!is_array($uids))
-      $uids = array($uids);
+      $uids = explode(',',$uids);
       
-    foreach ($uids as $uid)
+    foreach ($uids as $uid) {
       $msg_ids[$uid] = $this->_uid2id($uid);
+    }
       
-    if ($flag=='UNSEEN')
+    if ($flag=='UNDELETED')
+      $result = iil_C_Undelete($this->conn, $this->mailbox, join(',', array_values($msg_ids)));
+    else if ($flag=='UNSEEN')
       $result = iil_C_Unseen($this->conn, $this->mailbox, join(',', array_values($msg_ids)));
     else
       $result = iil_C_Flag($this->conn, $this->mailbox, join(',', array_values($msg_ids)), $flag);

--
Gitblit v1.9.1