From a5d4b4b4d018abdf10548af488f07c4a8894f6ad Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 22 May 2007 06:10:25 +0000 Subject: [PATCH] Fixed logging for departments and applications git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6429 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/applications/class_applicationGeneric.inc | 11 +++++++---- .../admin/departments/class_departmentGeneric.inc | 12 +++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc index 5ecab3a94..3b744aa1b 100644 --- a/plugins/admin/applications/class_applicationGeneric.inc +++ b/plugins/admin/applications/class_applicationGeneric.inc @@ -16,6 +16,7 @@ class application extends plugin var $gosaApplicationIcon= ""; var $gotoLogonScript =""; var $iconData; + var $view_logged = FALSE; /* Headpage attributes */ var $last_sorting= "invalid"; @@ -70,10 +71,6 @@ class application extends plugin $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn); } } - - if($this->is_account && $dn != "new"){ - @log::log("view","application/".get_class($this),$this->dn); - } } @@ -118,6 +115,12 @@ class application extends plugin /* Call parent execute */ plugin::execute(); + /* Log view */ + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","application/".get_class($this),$this->dn); + } + $smarty= get_smarty(); $tmp = $this->plInfo(); diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc index 9f96a555a..2b637e06e 100644 --- a/plugins/admin/departments/class_departmentGeneric.inc +++ b/plugins/admin/departments/class_departmentGeneric.inc @@ -33,7 +33,7 @@ class department extends plugin var $orig_dn= ""; var $is_administrational_unit= false; var $gosaUnitTag= ""; - + var $view_logged = FALSE; var $rec_dst=false; // Destination for recursive move var $rec_src=false; // Source for recursive move var $rec_cpy=false; // Is recursive move requested ? @@ -90,10 +90,6 @@ class department extends plugin $this->is_administrational_unit= true; $this->initially_was_tagged = true; } - - if($this->is_account && $dn != "new"){ - @log::log("view","department/".get_class($this),$this->dn); - } } function execute() @@ -101,6 +97,12 @@ class department extends plugin /* Call parent execute */ plugin::execute(); + /* Log view */ + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","department/".get_class($this),$this->dn); + } + /* Reload departments */ $this->config->get_departments($this->dn); $this->config->make_idepartments(); -- 2.30.2