From 230f944bf62f141f47c021dbfe6cc3d07b74a76d Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Wed, 24 Dec 2008 09:29:47 -0500
Subject: [PATCH] Allow empty strings for imap_root config parameter (was changed in r2143) to remain backward compatible but cache imap root and delimiter in session
---
program/include/rcube_user.php | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/program/include/rcube_user.php b/program/include/rcube_user.php
index cc09028..00f5cd7 100644
--- a/program/include/rcube_user.php
+++ b/program/include/rcube_user.php
@@ -31,7 +31,7 @@
{
public $ID = null;
public $data = null;
- public $language = 'en_US';
+ public $language = null;
private $db = null;
@@ -78,7 +78,8 @@
*/
function get_prefs()
{
- $prefs = array('language' => $this->language);
+ if (!empty($this->language))
+ $prefs = array('language' => $this->language);
if ($this->ID && $this->data['preferences'])
$prefs += (array)unserialize($this->data['preferences']);
@@ -156,7 +157,7 @@
WHERE del<>1
AND user_id=?
$sql_add
- ORDER BY ".$this->db->quoteIdentifier('standard')." DESC, name ASC",
+ ORDER BY ".$this->db->quoteIdentifier('standard')." DESC, name ASC, identity_id ASC",
$this->ID);
return $sql_result;
@@ -372,9 +373,9 @@
$user_name = $user != $user_email ? $user : '';
// try to resolve the e-mail address from the virtuser table
- if ($virtuser_query = $rcmail->config->get('virtuser_query') &&
- ($sql_result = $dbh->query(preg_replace('/%u/', $dbh->escapeSimple($user), $virtuser_query))) &&
- ($dbh->num_rows() > 0))
+ if (($virtuser_query = $rcmail->config->get('virtuser_query'))
+ && ($sql_result = $dbh->query(preg_replace('/%u/', $dbh->escapeSimple($user), $virtuser_query)))
+ && ($dbh->num_rows() > 0))
{
while ($sql_arr = $dbh->fetch_array($sql_result))
{
--
Gitblit v1.9.1