Permalink
Browse files

supress a few errors

  • Loading branch information...
1 parent 5bc955b commit ae9c03c947498d611ca8ffef049369905a61924f @splitbrain splitbrain committed with www-data Aug 12, 2010
Showing with 5 additions and 5 deletions.
  1. +3 −3 entry.php
  2. +2 −2 login.php
View
6 entry.php
@@ -134,9 +134,9 @@ function _saveData(){
$newdn = 'uid='.$new_uid;
if (empty($_REQUEST['type'])) { $_REQUEST['type']='public'; }
if($_REQUEST['type'] == 'private' && $conf['privatebook']){
- $newdn .= ', '.$conf['privatebook'].', '.$_SESSION['ldapab']['binddn'];
+ $newdn .= ','.$conf['privatebook'].','.$_SESSION['ldapab']['binddn'];
}else{
- $newdn .= ', '.$conf['publicbook'];
+ $newdn .= ','.$conf['publicbook'];
}
$entry['displayname'] = $entry['givenname'].' '.$entry['name'];;
$entry = prepare_ldap_entry($entry);
@@ -150,7 +150,7 @@ function _saveData(){
if(empty($dn)){
//new entry
$entry['uid'][] = $new_uid;
- $r = ldap_add($LDAP_CON,$newdn,$entry);
+ $r = @ldap_add($LDAP_CON,$newdn,$entry);
tpl_ldaperror();
return $newdn;
}else{
View
4 login.php
@@ -13,8 +13,8 @@
//create private address book if simple enough
if(preg_match('/ou=([^,]+)$/',$conf['privatebook'],$match)){
$privatedn = $conf['privatebook'].', '.$_SESSION['ldapab']['binddn'];
- if(!ldap_read($LDAP_CON,$privatedn,'')){
- ldap_add($LDAP_CON,$privatedn,
+ if(!@ldap_read($LDAP_CON,$privatedn,'')){
+ @ldap_add($LDAP_CON,$privatedn,
array('objectClass' => array ('organizationalUnit','top'),
'ou' => $match[1]));
}

0 comments on commit ae9c03c

Please sign in to comment.