Code

Fixed conversation errors
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sat, 8 Mar 2008 17:37:09 +0000 (17:37 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sat, 8 Mar 2008 17:37:09 +0000 (17:37 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9469 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc
gosa-plugins/netatalk/personal/netatalk/class_netatalk.inc

index 2299d1adfa7ff16d61811419c7ae9c1b1d55d1a6..40bd1a9871b51a38e3ce4ad318b9a97c12b0d411 100644 (file)
@@ -211,37 +211,40 @@ class termgroup extends plugin
       if ($_POST['saction'] != "wake"){
         foreach($member as $dn =>  $object){
 
-             /* Get object */
-             $ldap->cat($dn,array("objectClass"));
-             $res                = $ldap->fetch();
-             $attrs              = array();
-
-             /* Add FAI state */
-             $attrs['FAIstate']  = "";
-             if(isset($this->mapActions[$_POST['saction']])){
-                     $attrs['FAIstate'] = $this->mapActions[$_POST ['saction']];
-             }
-
-             /* Fix objectClass index */
-             for($i = 0; $i < $res['objectClass']['count'] ; $i ++){
-                     $attrs['objectClass'][] = $res['objectClass'][$i];
-             }
-
-             /* Check if we must add the objectClass */
-             if(($attrs['FAIstate'] != "") && (!in_array("FAIobject",$attrs['objectClass']))){
-                     $attrs['objectClass'][] = "FAIobject";
-             }
-
-             if($attrs['FAIstate'] == ""){
-                     $attrs['FAIstate'] = array();
-             }
-
-             $ldap->cd($dn);
-             $ldap->modify($attrs);
-        if (!$ldap->success()){
-          msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_MOD, get_class()));
+          /* Get object */
+          $ldap->cat($dn,array("objectClass"));
+          $res                = $ldap->fetch();
+          $attrs              = array();
+
+          /* Add FAI state */
+          $attrs['FAIstate']  = "";
+          if(isset($this->mapActions[$_POST['saction']])){
+            $attrs['FAIstate'] = $this->mapActions[$_POST ['saction']];
+          }
+
+          /* Fix objectClass index */
+          for($i = 0; $i < $res['objectClass']['count'] ; $i ++){
+            $attrs['objectClass'][] = $res['objectClass'][$i];
+          }
+
+          /* Check if we must add the objectClass */
+          if(($attrs['FAIstate'] != "") && (!in_array("FAIobject",$attrs['objectClass']))){
+            $attrs['objectClass'][] = "FAIobject";
+          }
+
+          if($attrs['FAIstate'] == ""){
+            $attrs['FAIstate'] = array();
+          }
+
+          $ldap->cd($dn);
+          $ldap->modify($attrs);
+
+          if (!$ldap->success()){
+            msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_MOD, get_class()));
+          }
         }
       }
+
     }
 
 
@@ -310,6 +313,7 @@ class termgroup extends plugin
     return ($smarty->fetch (get_template_path('termgroup.tpl', TRUE, dirname(__FILE__))));
   }
 
+
   function save_object()
   {
     plugin::save_object();  
@@ -373,8 +377,8 @@ class termgroup extends plugin
     if (!$ldap->success()){
       msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
     }
-
   }
+
   
   static function plInfo()
   {
index d4298095b85b97a68b73c3990c8b8b8c6cd555f9..5de5b9d01c5f979597a877f95dc2082fb09084e8 100644 (file)
@@ -187,7 +187,6 @@ class netatalk extends plugin {
         } else {
           $display = $this->show_enable_header(msgPool::addFeaturesButton(_("netatalk")), msgPool::featuresDisabled(_("netatalk")), TRUE);
         } 
-        }
         return ($display);
       }
     }