summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1f4cf6e)
raw | patch | inline | side by side (parent: 1f4cf6e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 16 May 2007 08:20:20 +0000 (08:20 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 16 May 2007 08:20:20 +0000 (08:20 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6390 594d385d-05f5-0310-b6e9-bd551577e9d8
index 9fdb2b15de0f1c98dc14f1ceab8470efb0b317e9..1fdbd52ff5a253412cbc9f6f8dd6f5c05fb89e6f 100644 (file)
}
}
$this->ui = get_userinfo();
+
+ @log::log("view","fai/".get_class($this),$this->dn);
}
prepare_to_save_FAI_object($use_dn,array(),true);
+ @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
+
foreach($this->SubObjects as $name => $obj){
# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $obj['dn']);
$use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $obj['dn']);
prepare_to_save_FAI_object($this->dn,$this->attrs);
show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/hook with dn '%s' failed."),$this->dn));
+ if($this->initially_was_account){
+ @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes);
+ }else{
+ @log::log("create","fai/".get_class($this),$this->dn,$this->attributes);
+ }
+
/* Do object tagging */
$this->handle_object_tagging();
index 71914a044b60d81aa981545f010e8f11b550bf84..6934a0cc428cc6fb058fe496856b02b91a42ab04 100644 (file)
****************/
/* Deltetion was confirmed, so delete this entry
- */
- if (isset($_POST['delete_terminal_confirm'])){
+ */
+ if (isset($_POST['delete_terminal_confirm'])){
- /* Some nice guy may send this as POST, so we've to check
- for the permissions again. */
+ /* Some nice guy may send this as POST, so we've to check
+ for the permissions again. */
/* Find out more about the object type */
$ldap = $this->config->get_ldap_link();
$ldap->cat($this->dn, array('objectClass'));
- $attrs = $ldap->fetch();
- $type = $this->get_type($attrs);
+ if($ldap->count()){
+ $attrs = $ldap->fetch();
+ $type = $this->get_type($attrs);
- $acl = $this->ui->get_permissions($this->dn,"fai/".$type[1]);
- if(preg_match("/d/",$acl)){
+ $acl = $this->ui->get_permissions($this->dn,"fai/".$type[1]);
+ if(preg_match("/d/",$acl)){
- $this->dialog = new $type[0]($this->config, $this->config->data['TABS'][$type[2]], $this->dn,"fai");
- $this->dialog->set_acl_base($this->dn);
- $this->dialog->by_object[$type[1]]->remove_from_parent ();
- unset ($this->dialog);
- gosa_log ("FAI class '".$this->dn."' has been tagged as removed");
- $this->dialog= NULL;
- $to_del = clean_up_releases($this->dn);
- save_release_changes_now();
+ $this->dialog = new $type[0]($this->config, $this->config->data['TABS'][$type[2]], $this->dn,"fai");
+ $this->dialog->set_acl_base($this->dn);
+ $this->dialog->by_object[$type[1]]->remove_from_parent ();
+ unset ($this->dialog);
+ gosa_log ("FAI class '".$this->dn."' has been tagged as removed");
+ $this->dialog= NULL;
+ $to_del = clean_up_releases($this->dn);
+ save_release_changes_now();
- foreach($to_del as $dn){
- $ldap->rmdir_recursive($dn);
- gosa_log(sprintf(_("Release cleanup : Removing object (tagged as remvoed) that is no longer in use '%s'."),$dn));
- }
+ foreach($to_del as $dn){
+ $ldap->rmdir_recursive($dn);
+ gosa_log(sprintf(_("Release cleanup : Removing object (tagged as remvoed) that is no longer in use '%s'."),$dn));
+ }
- } else {
+ } else {
- /* Normally this shouldn't be reached, send some extra
- logs to notify the administrator */
- print_red (_("You are not allowed to delete this component!"));
- gosa_log ("Warning: '".$this->ui->uid."' tried to trick system ".
- "deletion.");
- }
+ /* Normally this shouldn't be reached, send some extra
+ logs to notify the administrator */
+ print_red (_("You are not allowed to delete this component!"));
+ gosa_log ("Warning: '".$this->ui->uid."' tried to trick system ".
+ "deletion.");
+ }
+ }else{
+ print_red(sprintf(_("Object could not be deleted '%s', object does not exist."),$this->dn));
+ }
/* Remove lock file after successfull deletion */
del_lock ($this->dn);
}
index 9e45b692ed8751eeea978efbdc4761052d28ed98..37b7f128a08f2c919daea22c5ef331ded99703f5 100644 (file)
var $SubObjects = array(); // All leafobjects of this object
var $FAIdebianRelease = ""; // The selected release
- var $FAIdebianSection = ""; // selected section
+ var $FAIdebianSection = array(); // selected section
var $FAIinstallMethod = "aptitude"; // hard coded
var $mirror = ""; // selected mirror
$this->ConfiguredPackages[$attr['FAIpackage'][0]][$attr['FAIvariable'][0]]=$tmp;
}
}
+ @log::log("view","fai/".get_class($this),$this->dn);
}
if (isset($this->attrs['FAIdebianSection']['count'])){
prepare_to_save_FAI_object($use_dn,array(),true);
+ @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
+
foreach($this->ConfiguredPackages as $pkgname => $attrs){
foreach($attrs as $name => $attr){
$pkgdn = "FAIvariable=".$name.",".$this->dn;
return($a_ret);
}
- function genPkgs(){
+ function genPkgs()
+ {
/* Generate a list off available packages for this mirror, section and release
*/
/* Only read this file if it wasn't read before */
prepare_to_save_FAI_object($this->dn,$this->attrs);
show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/package list with dn '%s' failed."),$this->dn));
+
+ if($this->initially_was_account){
+ @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes);
+ }else{
+ @log::log("create","fai/".get_class($this),$this->dn,$this->attributes);
+ }
/* Do object tagging */
$this->handle_object_tagging();
diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc
index 550e719991cc036a9955d983edb24279c90b7179..cb8651c22f4affc24349027df515bf5f589d4274 100644 (file)
$this->disks[$name]['partitions'][$partition['FAIpartitionNr']] = $partition;
}
}
+
+ @log::log("view","fai/".get_class($this),$this->dn);
}
ksort($this->disks);
}
}
prepare_to_save_FAI_object($use_dn,array(),true);
-
+
+ @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
+
foreach($this->disks as $disk){
$disk_dn = "cn=".$disk['cn'].",".$this->dn;
prepare_to_save_FAI_object($this->dn,$this->attrs);
show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/partition table with dn '%s' failed."),$this->dn));
-
+
+ if($this->initially_was_account){
+ @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes);
+ }else{
+ @log::log("create","fai/".get_class($this),$this->dn,$this->attributes);
+ }
+
/* Do object tagging */
$this->handle_object_tagging();
index 568d120f2b3e55c9da471de7ae8284cba3cc6a43..52d87d9e46b39fad47069c1660e55998b17f9e18 100644 (file)
if($dn != "new"){
$this->dn =$dn;
+ @log::log("view","fai/".get_class($this),$this->dn);
}
$this->old_cn = $this->cn;
}
$use_dn = $this->dn;
}
+ @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
prepare_to_save_FAI_object($use_dn,array(),true);
$this->handle_post_events("remove");
}
$this->attrs['FAIclass']=trim($this->FAIclass);
prepare_to_save_FAI_object($this->dn,$this->attrs);
-
+
+ if($this->initially_was_account){
+ @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes);
+ }else{
+ @log::log("create","fai/".get_class($this),$this->dn,$this->attributes);
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/profile with dn '%s' failed."),$this->dn));
/* Do object tagging */
index c130a568d6cba899f26716d82ed72edf824ce727..edb3a03c8f25c5a2dd521abfc325d9f6559ed1af 100644 (file)
$objects = $this->get_object_attributes($objects,$this->subAttributes);
$this->SubObjects[$objects['cn']] = $objects;
}
+
+ @log::log("view","fai/".get_class($this),$this->dn);
}
$this->ui = get_userinfo();
}
if($_SESSION['faifilter']['branch'] == "main"){
$use_dn = $this->dn;
}
-
+
+ @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
+
prepare_to_save_FAI_object($use_dn,array(),true);
foreach($this->SubObjects as $name => $obj){
prepare_to_save_FAI_object($this->dn,$this->attrs);
show_ldap_error($ldap->get_error(), sprintf(_("Creating of FAI/script with dn '%s' failed."),$this->dn));
+ if($this->initially_was_account){
+ @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes);
+ }else{
+ @log::log("create","fai/".get_class($this),$this->dn,$this->attributes);
+ }
+
/* Do object tagging */
$this->handle_object_tagging();
index 83d556da9e6dcd4bb35f1892e8cd9dc24ea57071..8de436e3a7a23ad1b1d037305a8b40c6a43ccf8f 100644 (file)
$objects = $this->get_object_attributes($objects,$this->subAttributes);
$this->SubObjects[$objects['cn']] = $objects;
}
+
+ @log::log("view","fai/".get_class($this),$this->dn);
}
$this->ui = get_userinfo();
}
}
prepare_to_save_FAI_object($use_dn,array(),true);
+ @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
foreach($this->SubObjects as $name => $obj){
# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $obj['dn']);
prepare_to_save_FAI_object($this->dn,$this->attrs);
show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/template with dn '%s' failed."),$this->dn));
+ if($this->initially_was_account){
+ @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes);
+ }else{
+ @log::log("create","fai/".get_class($this),$this->dn,$this->attributes);
+ }
+
/* Do object tagging */
$this->handle_object_tagging();
index 60baec911497eab02a7b911977eeb5fda39d0c57..18d4c0368c634d6517081e70b9ff0e67d3be119c 100644 (file)
$this->SubObjects[$object['cn'][0]]['status'] = "edited";
$this->SubObjects[$object['cn'][0]]['dn'] = $object['dn'];
}
+
+ @log::log("view","fai/".get_class($this),$this->dn);
}
$this->ui = get_userinfo();
}
if($_SESSION['faifilter']['branch'] == "main"){
$use_dn = $this->dn;
}
-
+
prepare_to_save_FAI_object($use_dn,array(),true);
+ @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
foreach($this->SubObjects as $name => $obj){
$use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $obj['dn']);
$ldap = $this->config->get_ldap_link();
prepare_to_save_FAI_object($this->dn,$this->attrs);
show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/variable with dn '%s' failed."),$this->dn));
+
+ if($this->initially_was_account){
+ @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes);
+ }else{
+ @log::log("create","fai/".get_class($this),$this->dn,$this->attributes);
+ }
/* Do object tagging */
$this->handle_object_tagging();