Code

Some style and general fixes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 21 Jun 2005 09:20:07 +0000 (09:20 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 21 Jun 2005 09:20:07 +0000 (09:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@776 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/macro/class_gofonMacro.inc
plugins/gofon/macro/class_gofonMacroManagement.inc
plugins/gofon/macro/class_gofonMacroParameters.inc

index 488a290a312b5f125f2ebe1c5c26b12b9c6d832b..01024676f90dc37a9163a010cd6ac9e5751aa0c2 100755 (executable)
@@ -80,7 +80,6 @@ class macro extends plugin
       }
     }
 
-
     /* Show main page */
     return($smarty->fetch (get_template_path('generic.tpl', TRUE)));
   }
@@ -97,11 +96,10 @@ class macro extends plugin
     $ldap->cd ($this->config->current['BASE']);
     $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
     while ($ldap->fetch()){
-      $og= new ogroup($this->config, $ldap->getDN());
-      unset($og->member[$this->dn]);
-      $og->save ();
+        $og= new ogroup($this->config, $ldap->getDN());
+        unset($og->member[$this->dn]);
+        $og->save ();
     }
-
   }
 
 
@@ -129,7 +127,6 @@ class macro extends plugin
     if(($this->cn != strtolower($this->cn))||(empty($this->cn))){
       $message[] = "The attribute 'cn' must be lowercase and a least one char.";
     }
-
     return $message;
   }
 
index f3b873fb5d7f682391e988880fd9ef964b241c27..df63fc2de64fe1dbd6f54ee91233afbba812c713 100755 (executable)
@@ -199,11 +199,11 @@ class gofonMacro extends plugin
       /* Some nice guy may send this as POST, so we've to check
          for the permissions again. */
       if (chkacl($this->acl, "delete") == ""){
-
+      
         /* Delete request is permitted, perform LDAP action */
-        $this->macrotabs= new macrotabs($this->config,
-            $this->config->data['TABS']['MACROTABS'], $this->dn);
+        $this->macrotabs= new macrotabs($this->config,$this->config->data['TABS']['MACROTABS'], $this->dn);
         $this->macrotabs->set_acl(array($this->acl));
+      
         $this->macrotabs->delete ();
         gosa_log ("Application object'".$this->dn."' has been removed");
         unset ($this->macrotabs);
@@ -212,13 +212,11 @@ class gofonMacro extends plugin
         /* Group list has changed, reload it. */
         $this->reload ();
       } else {
-
         /* Normally this shouldn't be reached, send some extra
            logs to notify the administrator */
         print_red (_("You are not allowed to delete this application!"));
         gosa_log ("Warning: '".$this->ui->uid."' tried to trick group deletion.");
       }
-
       /* Remove lock file after successfull deletion */
       del_lock ($this->dn);
     }
index 19fc6204029562310dbfb182a0a4f471a234c158..f12da521e502ca04762eebf2472c6b6785e14ce6 100755 (executable)
@@ -60,7 +60,7 @@ class macroParameter extends plugin
       $tmp = split("!",$para);
       $tmp2[$tmp[0]]['name']           = $tmp[1];  
       $tmp2[$tmp[0]]['type']           = $tmp[2];  
-      $tmp2[$tmp[0]]['default']        = $tmp[3];  
+      $tmp2[$tmp[0]]['default']        = $tmp[3];  
     }
 
     /* Assign this array */
@@ -120,7 +120,7 @@ class macroParameter extends plugin
         $key = $_POST[$name];
         $this->goFonMacroParameter[$key]['name']               =$_POST["varname".$key];                
         $this->goFonMacroParameter[$key]['type']               =$_POST["vartype".$key];                
-        $this->goFonMacroParameter[$key]['default']            =$_POST["default".$key];                
+        $this->goFonMacroParameter[$key]['default']    =$_POST["default".$key];                
       }
     } 
 
@@ -170,21 +170,22 @@ class macroParameter extends plugin
 
   function remove_from_parent()
   {
+    /*
     $ldap= $this->config->get_ldap_link();
     $ldap->rmDir($this->dn);
 
-    /* Optionally execute a command after we're done */
+    /* Optionally execute a command after we're done * /
     $this->handle_post_events("remove");
 
-    /* Delete references to object groups */
+    /* Delete references to object groups * /
     $ldap->cd ($this->config->current['BASE']);
     $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
     while ($ldap->fetch()){
-      $og= new ogroup($this->config, $ldap->getDN());
-      unset($og->member[$this->dn]);
-      $og->save ();
+        $og= new ogroup($this->config, $ldap->getDN());
+        unset($og->member[$this->dn]);
+        $og->save ();
     }
-
+  */
   }
 
 
@@ -193,7 +194,6 @@ class macroParameter extends plugin
   {
     if (isset($_POST['cn'])){
       plugin::save_object();
-
     }
   }