From b795a2f1a5e0c8441b5aaefd1bd0294204bac59d Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 8 Nov 2010 06:29:01 +0000 Subject: [PATCH] Updated regsitration handling -Moved registration class to include -Updated statistic and dashBoard plugin to use the correct class. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20200 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../plugins/generic/dashBoard/class_dashBoard.inc | 4 +--- .../plugins/generic/statistics/class_statistics.inc | 10 +++------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc b/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc index b68367460..7a4466794 100644 --- a/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc +++ b/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc @@ -25,13 +25,11 @@ class dashBoard extends plugin // Detect registration status $this->RegistrationDialog = new RegistrationDialog($config); - $this->registered = GOsaRegistration::isRegistered($config); } function execute() { - - if(!$this->registered){ + if(!$this->config->registration->isRegistered()){ return($this->RegistrationDialog->execute()); } diff --git a/gosa-core/plugins/generic/statistics/class_statistics.inc b/gosa-core/plugins/generic/statistics/class_statistics.inc index 1bf0a2229..df1f8182e 100644 --- a/gosa-core/plugins/generic/statistics/class_statistics.inc +++ b/gosa-core/plugins/generic/statistics/class_statistics.inc @@ -33,11 +33,7 @@ class statistics extends plugin plugin::plugin($config, NULL); // Detect registration status first - $this->registered = - GOsaRegistration::isRegistered($config) && - GOsaRegistration::getRegistrationType($config) == "registered"; - - if($this->registered){ + if(!$this->config->registration->isRegistered()){ $this->graphs[] = new categoryActionsOverTime($config); $this->graphs[] = new memoryUsageChart($config); $this->graphs[] = new cpuLoadChart($config); @@ -141,7 +137,7 @@ class statistics extends plugin $smarty = get_smarty(); // Check registration status, we need at least 'registered'. - $smarty->assign("registered", $this->registered); + $smarty->assign("registered", $this->config->registration->isRegistered()); if(!$this->registered){ $plist = session::get('plist'); @@ -423,7 +419,7 @@ class statistics extends plugin function save_object() { // Nothing to do for not registered accounts. - if(!$this->registered) return; + if(!$this->config->registration->isRegistered()) return; plugin::save_object(); if(isset($_POST['graph1DatePicker1'])) $this->graph1DatePicker1 = get_post('graph1DatePicker1'); -- 2.30.2