diff options
Diffstat (limited to 'program/include/rcube_json_output.php')
-rw-r--r-- | program/include/rcube_json_output.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/program/include/rcube_json_output.php b/program/include/rcube_json_output.php index cd6b289b2..f9fe38d62 100644 --- a/program/include/rcube_json_output.php +++ b/program/include/rcube_json_output.php @@ -169,12 +169,16 @@ class rcube_json_output public function show_message($message, $type='notice', $vars=null, $override=true) { if ($override || !$this->message) { + if (rcube_label_exists($message)) { + if (!empty($vars)) + $vars = array_map('Q', $vars); + $msgtext = rcube_label(array('name' => $message, 'vars' => $vars)); + } + else + $msgtext = $message; + $this->message = $message; - $this->command( - 'display_message', - rcube_label(array('name' => $message, 'vars' => $vars)), - $type - ); + $this->command('display_message', $msgtext, $type, $timeout * 1000); } } |