From a02cfa9b085fc875fc55f57029a8e5846771ed5e Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Sat, 13 Aug 2011 05:10:11 -0400 Subject: [PATCH] Fix incomplete backport from trunk --- program/include/main.inc | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/program/include/main.inc b/program/include/main.inc index 72a1905..842b933 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -92,6 +92,16 @@ return rcmail::get_instance()->gettext($p, $domain); } +/** + * Global wrapper of rcmail::text_exists() + * to check whether a text label is defined + * + * @see rcmail::text_exists() + */ +function rcube_label_exists($name, $domain=null) +{ + return rcmail::get_instance()->text_exists($name, $domain); +} /** * Overwrite action variable @@ -1916,6 +1926,10 @@ $domain = $is_utf ? idn_to_ascii($domain) : idn_to_utf8($domain); + if ($domain === false) { + return ''; + } + return $at ? $user . '@' . $domain : $domain; } -- Gitblit v1.9.1