From bc8c2c57880523472b30f475d566a8133e2d2e20 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Sat, 21 May 2011 14:04:51 -0400 Subject: [PATCH] - Fix s/pattern/prefix/ in clear_cache() --- program/include/rcube_json_output.php | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/program/include/rcube_json_output.php b/program/include/rcube_json_output.php index 1ad1ec5..d1c9de2 100644 --- a/program/include/rcube_json_output.php +++ b/program/include/rcube_json_output.php @@ -5,7 +5,7 @@ | program/include/rcube_json_output.php | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2010, Roundcube Dev. - Switzerland | + | Copyright (C) 2008-2010, The Roundcube Dev Team | | Licensed under the GNU GPL | | | | PURPOSE: | @@ -170,11 +170,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); } } @@ -237,7 +234,11 @@ unset($this->env['task'], $this->env['action'], $this->env['comm_path']); $rcmail = rcmail::get_instance(); - $response = array('action' => $rcmail->action, 'unlock' => get_input_value('_unlock', RCUBE_INPUT_GPC)); + $response['action'] = $rcmail->action; + + if ($unlock = get_input_value('_unlock', RCUBE_INPUT_GPC)) { + $response['unlock'] = $unlock; + } if (!empty($this->env)) $response['env'] = $this->env; -- Gitblit v1.9.1