summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-02-06 22:21:23 +0000
committerthomascube <thomas@roundcube.net>2011-02-06 22:21:23 +0000
commit07b95dc49b31d131b1fecdabf2059a447935c196 (patch)
tree91f3fd3b86ecb88da28e16edceab52306bb3458e /program/include/rcmail.php
parent361ce60948bfc0eb75a4c144f9e1e76c3cdd7f35 (diff)
Delegate contact input validation to rcube_addressbook instance; accept already localized texts in rcube_output::show_message()
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 8c80fe20b..1c9810681 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -926,6 +926,22 @@ class rcmail
/**
+ * Check if the given text lable exists
+ *
+ * @param string Label name
+ * @return boolean True if text exists (either in the current language or in en_US)
+ */
+ public function text_exists($name, $domain=null)
+ {
+ // load localization files if not done yet
+ if (empty($this->texts))
+ $this->load_language();
+
+ // check for text with domain first
+ return ($domain && isset($this->texts[$domain.'.'.$name])) || isset($this->texts[$name]);
+ }
+
+ /**
* Load a localization package
*
* @param string Language ID