]> git.sur5r.net Git - contagged/commitdiff
supress a few errors
authorAndreas Gohr <gohr@cosmocode.de>
Thu, 12 Aug 2010 14:34:17 +0000 (16:34 +0200)
committerwww-data <www-data@fileserver.cosmo>
Thu, 12 Aug 2010 14:34:17 +0000 (16:34 +0200)
entry.php
login.php

index c14ff2d70dfaf7ab66169b63c80a1dd269902f4b..2bf488a7f15e3bff60579c19f1baf7bf37de9756 100644 (file)
--- a/entry.php
+++ b/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 @@ print '</pre>';
   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{
index 2aa4d16e0ca693d767929bc02409947d22c3f86d..96d0c4f850bc8a35237d3aa216ed1c053ef3e7ad 100644 (file)
--- a/login.php
+++ b/login.php
@@ -13,8 +13,8 @@ if(!empty($_REQUEST['username'])){
         //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]));
             }