From 715c7961ba8ff72fe40720bb4feaa7865e57e8b9 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 01 Mar 2011 16:22:52 -0500
Subject: [PATCH] Don't do exact matches when searching for existing email records

---
 program/include/rcube_template.php |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index 8b9327d..11c290a 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -84,7 +84,7 @@
         $this->add_script($javascript, 'head_top');
         $this->add_script($javascript_foot, 'foot');
         $this->scripts_path = 'program/js/';
-        $this->include_script('jquery-1.4.min.js');
+        $this->include_script('jquery-1.5.min.js');
         $this->include_script('common.js');
         $this->include_script('app.js');
 
@@ -255,10 +255,8 @@
     {
         if ($override || !$this->message) {
             $this->message = $message;
-            $this->command(
-                'display_message',
-                rcube_label(array('name' => $message, 'vars' => $vars)),
-                $type);
+            $msgtext = rcube_label_exists($message) ? rcube_label(array('name' => $message, 'vars' => $vars)) : $message;
+            $this->command('display_message', $msgtext, $type);
         }
     }
 
@@ -996,8 +994,11 @@
         $attrib['action'] = './';
 
         // we already have a <form> tag
-        if ($attrib['form'])
+        if ($attrib['form']) {
+            if ($this->framed || !empty($_REQUEST['_framed']))
+                $hidden->add(array('name' => '_framed', 'value' => '1'));
             return $hidden->show() . $content;
+        }
         else
             return $this->form_tag($attrib, $hidden->show() . $content);
     }
@@ -1031,7 +1032,7 @@
             $username = $this->app->user->get_username();
         }
 
-        return idn_to_utf8($username);
+        return rcube_idn_to_utf8($username);
     }
 
 
@@ -1229,8 +1230,8 @@
             'UTF-8'        => 'UTF-8 ('.rcube_label('unicode').')',
             'US-ASCII'     => 'ASCII ('.rcube_label('english').')',
             'ISO-8859-1'   => 'ISO-8859-1 ('.rcube_label('westerneuropean').')',
-            'ISO-8859-2'   => 'ISO-8895-2 ('.rcube_label('easterneuropean').')',
-            'ISO-8859-4'   => 'ISO-8895-4 ('.rcube_label('baltic').')',
+            'ISO-8859-2'   => 'ISO-8859-2 ('.rcube_label('easterneuropean').')',
+            'ISO-8859-4'   => 'ISO-8859-4 ('.rcube_label('baltic').')',
             'ISO-8859-5'   => 'ISO-8859-5 ('.rcube_label('cyrillic').')',
             'ISO-8859-6'   => 'ISO-8859-6 ('.rcube_label('arabic').')',
             'ISO-8859-7'   => 'ISO-8859-7 ('.rcube_label('greek').')',

--
Gitblit v1.9.1