From ae742c8166a03c3e08def37bfd68d5634aeb8d05 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 22 May 2007 08:10:20 +0000 Subject: [PATCH] Updated fai logging git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6430 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiHook.inc | 9 ++++++--- plugins/admin/fai/class_faiPackage.inc | 8 ++++++-- plugins/admin/fai/class_faiPartitionTable.inc | 13 +++++++++---- plugins/admin/fai/class_faiProfile.inc | 8 +++++++- plugins/admin/fai/class_faiScript.inc | 7 ++++++- plugins/admin/fai/class_faiTemplate.inc | 8 ++++++-- plugins/admin/fai/class_faiVariable.inc | 7 ++++++- 7 files changed, 46 insertions(+), 14 deletions(-) diff --git a/plugins/admin/fai/class_faiHook.inc b/plugins/admin/fai/class_faiHook.inc index 1fdbd52ff..e041ac882 100644 --- a/plugins/admin/fai/class_faiHook.inc +++ b/plugins/admin/fai/class_faiHook.inc @@ -35,7 +35,7 @@ class faiHook extends plugin var $is_dialog = false; // specifies which buttons will be shown to save or abort var $dialog = NULL; // a dialog, e.g. new disk dialog var $SubObjects = array(); // All leafobjects of this object - + var $view_logged = FALSE; var $FAIstate = ""; var $ui; @@ -82,8 +82,6 @@ class faiHook extends plugin } } $this->ui = get_userinfo(); - - @log::log("view","fai/".get_class($this),$this->dn); } @@ -150,6 +148,11 @@ class faiHook extends plugin /* Call parent execute */ plugin::execute(); + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","fai/".get_class($this),$this->dn); + } + /* Fill templating stuff */ $smarty= get_smarty(); $display= ""; diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 37b7f128a..4b00f8088 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -55,6 +55,7 @@ class faiPackage extends plugin var $newDialogShown =false; var $FAIstate = ""; + var $view_logged = FALSE; var $FAIinstallMethods = array( "install", "ninstall", "remove", "dselect-upgrade", "taskinst", "taskrm", @@ -134,7 +135,6 @@ class faiPackage extends plugin $this->ConfiguredPackages[$attr['FAIpackage'][0]][$attr['FAIvariable'][0]]=$tmp; } } - @log::log("view","fai/".get_class($this),$this->dn); } if (isset($this->attrs['FAIdebianSection']['count'])){ @@ -169,9 +169,13 @@ class faiPackage extends plugin function execute() { /* Call parent execute */ - plugin::execute(); + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","fai/".get_class($this),$this->dn); + } + /* Fill templating stuff */ $smarty= get_smarty(); $display= ""; diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc index cb8651c22..7825da40d 100644 --- a/plugins/admin/fai/class_faiPartitionTable.inc +++ b/plugins/admin/fai/class_faiPartitionTable.inc @@ -22,6 +22,8 @@ class faiPartitionTable extends plugin var $FAIstate = ""; var $ui; + var $view_logged = FALSE; + function faiPartitionTable ($config, $dn= NULL) { /* Load Attributes */ @@ -99,8 +101,6 @@ class faiPartitionTable extends plugin $this->disks[$name]['partitions'][$partition['FAIpartitionNr']] = $partition; } } - - @log::log("view","fai/".get_class($this),$this->dn); } ksort($this->disks); } @@ -121,8 +121,13 @@ class faiPartitionTable extends plugin function execute() { - /* Call parent execute */ - plugin::execute(); + /* Call parent execute */ + plugin::execute(); + + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","fai/".get_class($this),$this->dn); + } /* Fill templating stuff */ $smarty= get_smarty(); diff --git a/plugins/admin/fai/class_faiProfile.inc b/plugins/admin/fai/class_faiProfile.inc index 52d87d9e4..0c8ef80a9 100644 --- a/plugins/admin/fai/class_faiProfile.inc +++ b/plugins/admin/fai/class_faiProfile.inc @@ -27,6 +27,7 @@ class faiProfile extends plugin var $FAIAllclasses = array(); // Contains all possible Classnames var $ui ; var $FAIstate = ""; + var $view_logged = FALSE; function faiProfile($config, $dn= NULL) { @@ -100,7 +101,6 @@ class faiProfile extends plugin if($dn != "new"){ $this->dn =$dn; - @log::log("view","fai/".get_class($this),$this->dn); } $this->old_cn = $this->cn; } @@ -205,6 +205,12 @@ class faiProfile extends plugin { /* Call parent execute */ plugin::execute(); + + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","fai/".get_class($this),$this->dn); + } + /* Fill templating stuff */ $smarty= get_smarty(); $display= ""; diff --git a/plugins/admin/fai/class_faiScript.inc b/plugins/admin/fai/class_faiScript.inc index edb3a03c8..58e8aed41 100644 --- a/plugins/admin/fai/class_faiScript.inc +++ b/plugins/admin/fai/class_faiScript.inc @@ -38,6 +38,7 @@ class faiScript extends plugin var $FAIstate =""; + var $view_logged = FALSE; var $ui; function faiScript ($config, $dn= NULL) @@ -85,7 +86,6 @@ class faiScript extends plugin $this->SubObjects[$objects['cn']] = $objects; } - @log::log("view","fai/".get_class($this),$this->dn); } $this->ui = get_userinfo(); } @@ -141,6 +141,11 @@ class faiScript extends plugin /* Call parent execute */ plugin::execute(); + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","fai/".get_class($this),$this->dn); + } + /* Fill templating stuff */ $smarty= get_smarty(); $display= ""; diff --git a/plugins/admin/fai/class_faiTemplate.inc b/plugins/admin/fai/class_faiTemplate.inc index 8de436e3a..e0af9e9fe 100644 --- a/plugins/admin/fai/class_faiTemplate.inc +++ b/plugins/admin/fai/class_faiTemplate.inc @@ -38,6 +38,7 @@ class faiTemplate extends plugin var $FAIstate = ""; var $ui; + var $view_logged = FALSE; function faiTemplate ($config, $dn= NULL) { @@ -82,8 +83,6 @@ class faiTemplate extends plugin $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(); } @@ -125,6 +124,11 @@ class faiTemplate extends plugin /* Call parent execute */ plugin::execute(); + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","fai/".get_class($this),$this->dn); + } + /* Fill templating stuff */ $smarty= get_smarty(); $display= ""; diff --git a/plugins/admin/fai/class_faiVariable.inc b/plugins/admin/fai/class_faiVariable.inc index fa81784ca..b31e01317 100644 --- a/plugins/admin/fai/class_faiVariable.inc +++ b/plugins/admin/fai/class_faiVariable.inc @@ -36,6 +36,7 @@ class faiVariable extends plugin var $FAIstate = ""; var $ui ; + var $view_logged = FALSE; function faiVariable ($config, $dn= NULL) { @@ -86,7 +87,6 @@ class faiVariable extends plugin $this->SubObjects[$object['cn'][0]]['dn'] = $object['dn']; } - @log::log("view","fai/".get_class($this),$this->dn); } $this->ui = get_userinfo(); } @@ -110,6 +110,11 @@ class faiVariable extends plugin /* Call parent execute */ plugin::execute(); + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","fai/".get_class($this),$this->dn); + } + /* Fill templating stuff */ $smarty= get_smarty(); $display= ""; -- 2.30.2