summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_json_output.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-05-01 19:04:26 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-05-01 19:04:26 +0000
commit153e5184d4ae40f06c453c22f923d1a294fc4bfa (patch)
tree3fc6a8e076449b4df51b2515f78c6724a7339a07 /roundcubemail/program/include/rcube_json_output.php
parentd065289028e049e8f615c9112dd4c29d4a51a1d8 (diff)
Add plugin hooks for creating/saving/deleting identities and contacts
git-svn-id: https://svn.roundcube.net/trunk@2441 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_json_output.php')
-rw-r--r--roundcubemail/program/include/rcube_json_output.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/roundcubemail/program/include/rcube_json_output.php b/roundcubemail/program/include/rcube_json_output.php
index 7c79157fd..2fbf9c0c5 100644
--- a/roundcubemail/program/include/rcube_json_output.php
+++ b/roundcubemail/program/include/rcube_json_output.php
@@ -33,6 +33,7 @@ class rcube_json_output
private $env = array();
private $texts = array();
private $commands = array();
+ private $message = null;
public $type = 'js';
public $ajax_call = true;
@@ -146,15 +147,19 @@ class rcube_json_output
* @param string Message to display
* @param string Message type [notice|confirm|error]
* @param array Key-value pairs to be replaced in localized text
+ * @param boolean Override last set message
* @uses self::command()
*/
- public function show_message($message, $type='notice', $vars=null)
+ public function show_message($message, $type='notice', $vars=null, $override=true)
{
- $this->command(
- 'display_message',
- rcube_label(array('name' => $message, 'vars' => $vars)),
- $type
- );
+ if ($override || !$this->message) {
+ $this->message = $message;
+ $this->command(
+ 'display_message',
+ rcube_label(array('name' => $message, 'vars' => $vars)),
+ $type
+ );
+ }
}
/**