From 07b95dc49b31d131b1fecdabf2059a447935c196 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sun, 06 Feb 2011 17:21:23 -0500
Subject: [PATCH] Delegate contact input validation to rcube_addressbook instance; accept already localized texts in rcube_output::show_message()

---
 program/include/main.inc |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/program/include/main.inc b/program/include/main.inc
index 697b3ff..155f4af 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -84,6 +84,7 @@
  * It's a global wrapper for rcmail::gettext()
  *
  * @param mixed Named parameters array or label name
+ * @param string Domain to search in (e.g. plugin name)
  * @return string Localized text
  * @see rcmail::gettext()
  */
@@ -94,6 +95,18 @@
 
 
 /**
+ * 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
  *
  * @param string New action value

--
Gitblit v1.9.1