Code

Removed instances of $ldap->error
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Mar 2008 09:50:33 +0000 (09:50 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Mar 2008 09:50:33 +0000 (09:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9485 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_FAI.inc
gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc

index 33bc842cb180b9a3b9ce6fb93cd412199aaa9ff6..f408ef4a6efd04d6d1448cb7918df4d229312eac 100644 (file)
@@ -979,7 +979,7 @@ class FAI
           $ldap->add($attr);
         }
 
-        if($ldap->error != "Success"){
+        if(!$ldap->success()){
 
           /* Some error occurred */
           print "---------------------------------------------";
index 40bd1a9871b51a38e3ce4ad318b9a97c12b0d411..c1f30079305f848fba7b0a9b800cd03a7368f9f7 100644 (file)
@@ -57,7 +57,7 @@ class termgroup extends plugin
       for ($i= 0; $i<$this->attrs['member']['count']; $i++){
         $member= $this->attrs['member'][$i];
         $ldap->cat($member, array('objectClass', 'macAddress', 'cn'));
-        if (preg_match("/success/i", $ldap->error)){
+        if ($ldap->success()){
           $attrs = $ldap->fetch();
           if (in_array("gotoTerminal", $attrs['objectClass']) ||
               in_array("gotoWorkstation", $attrs['objectClass'])){