Skip to content
This repository
Browse code

supress a few errors

  • Loading branch information...
commit ae9c03c947498d611ca8ffef049369905a61924f 1 parent 5bc955b
Andreas Gohr authored August 12, 2010 www-data committed August 12, 2010

Showing 2 changed files with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. 6  entry.php
  2. 4  login.php
6  entry.php
@@ -134,9 +134,9 @@ function _saveData(){
134 134
   $newdn   = 'uid='.$new_uid;
135 135
   if (empty($_REQUEST['type'])) { $_REQUEST['type']='public'; }
136 136
   if($_REQUEST['type'] == 'private' && $conf['privatebook']){
137  
-    $newdn .= ', '.$conf['privatebook'].', '.$_SESSION['ldapab']['binddn'];
  137
+    $newdn .= ','.$conf['privatebook'].','.$_SESSION['ldapab']['binddn'];
138 138
   }else{
139  
-    $newdn .= ', '.$conf['publicbook'];
  139
+    $newdn .= ','.$conf['publicbook'];
140 140
   }
141 141
   $entry['displayname'] = $entry['givenname'].' '.$entry['name'];;
142 142
   $entry = prepare_ldap_entry($entry);
@@ -150,7 +150,7 @@ function _saveData(){
150 150
   if(empty($dn)){
151 151
     //new entry
152 152
     $entry['uid'][] = $new_uid;
153  
-    $r = ldap_add($LDAP_CON,$newdn,$entry);
  153
+    $r = @ldap_add($LDAP_CON,$newdn,$entry);
154 154
     tpl_ldaperror();
155 155
     return $newdn;
156 156
   }else{
4  login.php
@@ -13,8 +13,8 @@
13 13
         //create private address book if simple enough
14 14
         if(preg_match('/ou=([^,]+)$/',$conf['privatebook'],$match)){
15 15
             $privatedn = $conf['privatebook'].', '.$_SESSION['ldapab']['binddn'];
16  
-            if(!ldap_read($LDAP_CON,$privatedn,'')){
17  
-                ldap_add($LDAP_CON,$privatedn,
  16
+            if(!@ldap_read($LDAP_CON,$privatedn,'')){
  17
+                @ldap_add($LDAP_CON,$privatedn,
18 18
                          array('objectClass' => array ('organizationalUnit','top'),
19 19
                                'ou' => $match[1]));
20 20
             }

0 notes on commit ae9c03c

Please sign in to comment.
Something went wrong with that request. Please try again.