From 1b4f65c17a53fbda492f4eb8015336d2006c4a45 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 21 May 2007 10:50:15 +0000 Subject: [PATCH] Added logging to addons git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6419 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/addons/gotomasses/class_gotomasses.inc | 8 +++++++- plugins/addons/ldapmanager/class_csvimport.inc | 7 +++++++ plugins/addons/ldapmanager/class_export.inc | 7 +++++++ plugins/addons/ldapmanager/class_exportxls.inc | 7 +++++++ plugins/addons/ldapmanager/class_import.inc | 7 +++++++ plugins/addons/logview/class_logview.inc | 7 +++++++ plugins/addons/mailqueue/class_mailqueue.inc | 7 +++++++ plugins/addons/notifications/class_msgplug.inc | 7 +++++++ 8 files changed, 56 insertions(+), 1 deletion(-) diff --git a/plugins/addons/gotomasses/class_gotomasses.inc b/plugins/addons/gotomasses/class_gotomasses.inc index 61d729e8a..c362ab439 100644 --- a/plugins/addons/gotomasses/class_gotomasses.inc +++ b/plugins/addons/gotomasses/class_gotomasses.inc @@ -21,7 +21,7 @@ class gotomasses extends plugin * shown if the content wasn't saved or discarded */ var $contents_backup = array(); - + var $view_logged = FALSE; var $contents_initially_loaded = FALSE; function gotomasses($config, $dn= NULL) @@ -55,6 +55,12 @@ class gotomasses extends plugin $this->contents_initially_loaded = TRUE; } + /* Log view */ + if(!$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","gotomasses/".get_class($this),$this->dn); + } + if(isset($_POST['export_gotomass_csv']) && $this->acl_is_writeable("something")){ $data = ""; foreach($this->contents as $val){ diff --git a/plugins/addons/ldapmanager/class_csvimport.inc b/plugins/addons/ldapmanager/class_csvimport.inc index 0831366ba..9b3cf27d0 100644 --- a/plugins/addons/ldapmanager/class_csvimport.inc +++ b/plugins/addons/ldapmanager/class_csvimport.inc @@ -13,6 +13,7 @@ class csvimport extends plugin /* attribute list for save action */ var $attributes= array(); var $objectclasses= array(); + var $view_logged = FALSE; function csvimport ($config, $dn= NULL) { @@ -27,6 +28,12 @@ class csvimport extends plugin /* Call parent execute */ plugin::execute(); + /* Log view */ + if(!$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","all/".get_class($this),$this->dn); + } + /* initiate smarty */ $smarty= get_smarty(); $smarty->assign("selectedattrs",array(0=>"")); diff --git a/plugins/addons/ldapmanager/class_export.inc b/plugins/addons/ldapmanager/class_export.inc index 53f07d8fd..d64dc79d4 100644 --- a/plugins/addons/ldapmanager/class_export.inc +++ b/plugins/addons/ldapmanager/class_export.inc @@ -9,6 +9,7 @@ class ldifexport extends plugin /* attribute list for save action */ var $attributes= array(); var $objectclasses= array(); + var $view_logged = FALSE; function ldifexport ($config, $dn= NULL) { @@ -22,6 +23,12 @@ class ldifexport extends plugin /* Call parent execute */ plugin::execute(); + /* Log view */ + if(!$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","all/".get_class($this),$this->dn); + } + /* Set government mode */ $smarty= get_smarty(); diff --git a/plugins/addons/ldapmanager/class_exportxls.inc b/plugins/addons/ldapmanager/class_exportxls.inc index 0135d6e90..6a3302a81 100644 --- a/plugins/addons/ldapmanager/class_exportxls.inc +++ b/plugins/addons/ldapmanager/class_exportxls.inc @@ -12,6 +12,7 @@ class xlsexport extends plugin var $attributes= array(); var $objectclasses= array(); var $ui; + var $view_logged = FALSE; function xlsexport ($config, $dn= NULL) { @@ -26,6 +27,12 @@ class xlsexport extends plugin /* Call parent execute */ plugin::execute(); + /* Log view */ + if(!$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","all/".get_class($this),$this->dn); + } + /* Set government mode */ $smarty= get_smarty(); diff --git a/plugins/addons/ldapmanager/class_import.inc b/plugins/addons/ldapmanager/class_import.inc index 44769e9a0..ff61022bf 100644 --- a/plugins/addons/ldapmanager/class_import.inc +++ b/plugins/addons/ldapmanager/class_import.inc @@ -11,6 +11,7 @@ class ldifimport extends plugin var $attributes= array(); var $objectclasses= array(); var $ui; + var $view_logged = FALSE; function ldifimport ($config, $dn= NULL) { @@ -25,6 +26,12 @@ class ldifimport extends plugin /* Call parent execute */ plugin::execute(); + /* Log view */ + if(!$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","all/".get_class($this),$this->dn); + } + /* Set government mode */ $smarty= get_smarty(); diff --git a/plugins/addons/logview/class_logview.inc b/plugins/addons/logview/class_logview.inc index 1bde25d68..844969fc7 100644 --- a/plugins/addons/logview/class_logview.inc +++ b/plugins/addons/logview/class_logview.inc @@ -18,6 +18,7 @@ class logview extends plugin var $fields= array("log_level", "host", "time_stamp", "message"); var $last= array("log_level", "host", "time", "regex"); var $range = 25; + var $view_logged = FALSE; function logview ($config, $dn= NULL) { @@ -43,6 +44,12 @@ class logview extends plugin /* Call parent execute */ plugin::execute(); + /* Log view */ + if(!$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","logview/".get_class($this),$this->dn); + } + $logfilter= get_global("logfilter"); $smarty= get_smarty(); $smarty->assign("search_result", ""); diff --git a/plugins/addons/mailqueue/class_mailqueue.inc b/plugins/addons/mailqueue/class_mailqueue.inc index 19268178d..fea487fd5 100644 --- a/plugins/addons/mailqueue/class_mailqueue.inc +++ b/plugins/addons/mailqueue/class_mailqueue.inc @@ -19,6 +19,7 @@ class mailqueue extends plugin var $SortType = "up"; var $disp_header = false; var $range = 20; + var $view_logged = FALSE; function mailqueue($config, $dn= NULL) { @@ -47,6 +48,12 @@ class mailqueue extends plugin /* Call parent execute */ plugin::execute(); + /* Log view */ + if(!$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","mailqueue/".get_class($this),$this->dn); + } + if(isset($_POST['EntriesPerPage'])){ $this->range = $_POST['EntriesPerPage']; } diff --git a/plugins/addons/notifications/class_msgplug.inc b/plugins/addons/notifications/class_msgplug.inc index 7eb40cf1f..517a78e3b 100644 --- a/plugins/addons/notifications/class_msgplug.inc +++ b/plugins/addons/notifications/class_msgplug.inc @@ -23,6 +23,7 @@ class msgplug extends plugin var $template= ""; var $finalized= false; var $module = "msgplug"; + var $view_logged = FALSE; function msgplug ($config, $dn= NULL) { @@ -81,6 +82,12 @@ class msgplug extends plugin /* Call parent execute */ plugin::execute(); + /* Log view */ + if(!$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","msgplug/".get_class($this),$this->dn); + } + /* Send message? */ if (isset($_POST['send']) && $this->acl_is_writeable("notify")){ -- 2.30.2