diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-06 22:21:23 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-06 22:21:23 +0000 |
| commit | a556142342d27fc7990aaaf17c994f10f6443a15 (patch) | |
| tree | f1c87644879af243b86406043ae61f4a135547de /roundcubemail/program/include/rcmail.php | |
| parent | 33db0234078b56472d9fe77769d705a68f8c0699 (diff) | |
Delegate contact input validation to rcube_addressbook instance; accept already localized texts in rcube_output::show_message()
git-svn-id: https://svn.roundcube.net/trunk@4498 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcmail.php')
| -rw-r--r-- | roundcubemail/program/include/rcmail.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcmail.php b/roundcubemail/program/include/rcmail.php index 8c80fe20b..1c9810681 100644 --- a/roundcubemail/program/include/rcmail.php +++ b/roundcubemail/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 |
