alecpl
2008-05-08 ed5ed98bea879a801c11c66589395452b9b8087b
- make address_book_type option case insensitive


2 files modified
8 ■■■■ changed files
program/steps/addressbook/func.inc 6 ●●●● patch | view | raw | blame | history
program/steps/mail/addcontact.inc 2 ●●● patch | view | raw | blame | history
program/steps/addressbook/func.inc
@@ -22,7 +22,7 @@
// 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['address_book_type'] == 'ldap') {
else if (strtolower($CONFIG['address_book_type']) == 'ldap') {
    // Get the first LDAP address book.
    $source = key((array)$CONFIG['ldap_public']);
    $prop = current((array)$CONFIG['ldap_public']);
@@ -49,7 +49,7 @@
// add list of address sources to client env
$js_list = array();
if ($CONFIG['address_book_type'] != 'ldap') {
if (strtolower($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
@@ -76,7 +76,7 @@
    
  // allow the following attributes to be added to the <ul> tag
  $out = '<ul' . create_attrib_string($attrib, array('style', 'class', 'id')) . ">\n";
  if ($CONFIG['address_book_type'] != 'ldap') {
  if (strtolower($CONFIG['address_book_type']) != 'ldap') {
    $out .= sprintf($line_templ,
      'rcmli'.$local_id,
      !$current ? 'selected' : '',
program/steps/mail/addcontact.inc
@@ -24,7 +24,7 @@
if (!empty($_POST['_address']))
{
  $CONTACTS = array();
  if ($CONFIG['address_book_type'] == 'ldap') {
  if (strtolower($CONFIG['address_book_type']) == 'ldap') {
    // Use the first writable LDAP address book.
    foreach ($CONFIG["ldap_public"] as $id => $prop) {
      if ($prop["writable"]) {