summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-05-08 08:17:35 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-05-08 08:17:35 +0000
commit9f0fddc89d094de36db1ee84175aac530e974cce (patch)
tree4b41ab871a5292f35fc998f53ee1fd764cf6993f /roundcubemail/program/steps
parentac10fb742976230fc1e304cdcd1b40cd698d4bc5 (diff)
- Option 'use_SQL_address_book' replaced by 'address_book_type'
git-svn-id: https://svn.roundcube.net/trunk@1364 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
-rw-r--r--roundcubemail/program/steps/addressbook/func.inc11
-rw-r--r--roundcubemail/program/steps/mail/addcontact.inc2
2 files changed, 5 insertions, 8 deletions
diff --git a/roundcubemail/program/steps/addressbook/func.inc b/roundcubemail/program/steps/addressbook/func.inc
index a08b5510c..8938cfaed 100644
--- a/roundcubemail/program/steps/addressbook/func.inc
+++ b/roundcubemail/program/steps/addressbook/func.inc
@@ -22,16 +22,13 @@
// instantiate a contacts object according to the given source
if (($source = get_input_value('_source', RCUBE_INPUT_GPC)) && isset($CONFIG['ldap_public'][$source]))
$CONTACTS = new rcube_ldap($CONFIG['ldap_public'][$source]);
-else {
- if (!$CONFIG["use_SQL_address_book"]) {
+else if ($CONFIG['address_book_type'] == 'ldap') {
// Get the first LDAP address book.
$source = key((array)$CONFIG['ldap_public']);
$prop = current((array)$CONFIG['ldap_public']);
$CONTACTS = new rcube_ldap($prop);
- } // end if
- else {
+} else {
$CONTACTS = new rcube_contacts($DB, $_SESSION['user_id']);
- } // end else
} // end else
$CONTACTS->set_pagesize($CONFIG['pagesize']);
@@ -52,7 +49,7 @@ $OUTPUT->set_env('readonly', $CONTACTS->readonly, false);
// add list of address sources to client env
$js_list = array();
-if ($CONFIG["use_SQL_address_book"]) {
+if ($CONFIG['address_book_type'] != 'ldap') {
// We are using the DB address book, add it.
$js_list = array("0" => array('id' => 0, 'readonly' => false));
} // end if
@@ -79,7 +76,7 @@ function rcmail_directory_list($attrib)
// allow the following attributes to be added to the <ul> tag
$out = '<ul' . create_attrib_string($attrib, array('style', 'class', 'id')) . ">\n";
- if ($CONFIG["use_SQL_address_book"]) {
+ if ($CONFIG['address_book_type'] != 'ldap') {
$out .= sprintf($line_templ,
'rcmli'.$local_id,
!$current ? 'selected' : '',
diff --git a/roundcubemail/program/steps/mail/addcontact.inc b/roundcubemail/program/steps/mail/addcontact.inc
index 6f4187ba4..65682688f 100644
--- a/roundcubemail/program/steps/mail/addcontact.inc
+++ b/roundcubemail/program/steps/mail/addcontact.inc
@@ -24,7 +24,7 @@ $done = false;
if (!empty($_POST['_address']))
{
$CONTACTS = array();
- if (!$CONFIG["use_SQL_address_book"]) {
+ if ($CONFIG['address_book_type'] == 'ldap') {
// Use the first writable LDAP address book.
foreach ($CONFIG["ldap_public"] as $id => $prop) {
if ($prop["writable"]) {