From 1be18031470a7f8af2a81df22a84e3369b7463a5 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 2 Aug 2010 15:25:09 +0000 Subject: [PATCH] Updated stats for management classes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19347 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_management.inc | 6 +++++- gosa-core/include/class_stats.inc | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gosa-core/include/class_management.inc b/gosa-core/include/class_management.inc index 05070256b..e4b9c9ac5 100644 --- a/gosa-core/include/class_management.inc +++ b/gosa-core/include/class_management.inc @@ -203,7 +203,11 @@ class management $this->snapHandler->setSnapshotBases($bases); } - + + // Create statistic table entry + stats::log('management', $class = get_class($this), $this->getAclCategories(), $action = 'view', + $amount = 1, $duration = (microtime(TRUE) - $this->initTime)); + // Display list return($this->renderList()); } diff --git a/gosa-core/include/class_stats.inc b/gosa-core/include/class_stats.inc index 2ae68eaf8..09f9f9726 100644 --- a/gosa-core/include/class_stats.inc +++ b/gosa-core/include/class_stats.inc @@ -568,6 +568,8 @@ class stats SELECT PLUGIN, RENDER_TIME AS RM FROM {$TABLE_NAME} GROUP BY PLUGIN + ORDER BY RM DESC + LIMIT 10 "; $ret = sqlite_query($query, $res); -- 2.30.2