From: hickert Date: Tue, 21 Jun 2005 09:20:07 +0000 (+0000) Subject: Some style and general fixes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c28524595283a9d43abcb61242ccb02704e9b275;p=gosa.git Some style and general fixes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@776 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofon/macro/class_gofonMacro.inc b/plugins/gofon/macro/class_gofonMacro.inc index 488a290a3..01024676f 100755 --- a/plugins/gofon/macro/class_gofonMacro.inc +++ b/plugins/gofon/macro/class_gofonMacro.inc @@ -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; } diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc index f3b873fb5..df63fc2de 100755 --- a/plugins/gofon/macro/class_gofonMacroManagement.inc +++ b/plugins/gofon/macro/class_gofonMacroManagement.inc @@ -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); } diff --git a/plugins/gofon/macro/class_gofonMacroParameters.inc b/plugins/gofon/macro/class_gofonMacroParameters.inc index 19fc62040..f12da521e 100755 --- a/plugins/gofon/macro/class_gofonMacroParameters.inc +++ b/plugins/gofon/macro/class_gofonMacroParameters.inc @@ -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(); - } }