From be2380fb47b05a222ec5b22deff36d5156a8c943 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 13 Jan 2006 13:08:41 -0500
Subject: [PATCH] Added labels for LDAP search

---
 program/steps/addressbook/func.inc |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index ee3b880..f7993c9 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -30,7 +30,12 @@
 else
   $CONTACTS_LIST['page'] = $_SESSION['page'] ? $_SESSION['page'] : 1;
 
-
+// disable the ldap public search button if there's no servers configured
+$enable_ldap = 'true';
+if (!$CONFIG['ldap_public'])
+  $enable_ldap = 'false';
+  
+$OUTPUT->add_script("$JS_OBJECT_NAME.set_env('ldappublicsearch', $enable_ldap);");  
 
 // return the message list as HTML table
 function rcmail_contacts_list($attrib)

--
Gitblit v1.9.1