From: hickert Date: Fri, 5 Nov 2010 16:24:16 +0000 (+0000) Subject: Updated Handling of the registration process X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bda4ba7d9c7d9801e68bde6f5d5bb823b0f73e36;p=gosa.git Updated Handling of the registration process -Moving classes to include. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20198 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_GOsaRegistration.inc b/gosa-core/include/class_GOsaRegistration.inc new file mode 100644 index 000000000..2685bcabb --- /dev/null +++ b/gosa-core/include/class_GOsaRegistration.inc @@ -0,0 +1,12 @@ + diff --git a/gosa-core/include/class_config.inc b/gosa-core/include/class_config.inc index 329ae0fd0..a630ab8a9 100644 --- a/gosa-core/include/class_config.inc +++ b/gosa-core/include/class_config.inc @@ -91,6 +91,7 @@ class config { // Load configuration registry $this->configRegistry = new configRegistry($this); + $this->registration = new GOsaRegistration($this); } diff --git a/gosa-core/plugins/generic/dashBoard/Register/class_RegisterGOsa.inc b/gosa-core/plugins/generic/dashBoard/Register/class_RegisterGOsa.inc index c95f4a82d..d79cce7c7 100644 --- a/gosa-core/plugins/generic/dashBoard/Register/class_RegisterGOsa.inc +++ b/gosa-core/plugins/generic/dashBoard/Register/class_RegisterGOsa.inc @@ -2,6 +2,7 @@ class GOsaRegistration extends plugin { + static function registerGOsa($config, $uuid, $type, $userData = array()) { echo "
Register GOsa."; @@ -17,8 +18,12 @@ class GOsaRegistration extends plugin static function isRegistered($config, $uuid = NULL) { + // Return cached values first. + if(GOsaRegistration::$isRegistered != NULL) return(GOsaRegistration::$isRegistered); + // Get the GOsa-instance-uuid and ask the backend if a registration of this uuid is known. $instanceUUID = $config->getInstanceUUID(); + echo $instanceUUID; $status = $config->configRegistry->getPropertyValue('GOsaRegistration','registerStatus'); diff --git a/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc b/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc index a983faf36..b68367460 100644 --- a/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc +++ b/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc @@ -24,7 +24,7 @@ class dashBoard extends plugin // Detect registration status - $this->GOsaRegistration = new GOsaRegistration($config); + $this->RegistrationDialog = new RegistrationDialog($config); $this->registered = GOsaRegistration::isRegistered($config); } @@ -32,7 +32,7 @@ class dashBoard extends plugin { if(!$this->registered){ - return($this->GOsaRegistration->execute()); + return($this->RegistrationDialog->execute()); } $smarty = get_smarty(); @@ -57,7 +57,7 @@ class dashBoard extends plugin { plugin::save_object(); - if(!$this->registered) $this->GOsaRegistration->save_object(); + if(!$this->registered) $this->RegistrationDialog->save_object(); $this->dbPluginStatus->save_object(); $this->dbChannelStatus->save_object(); diff --git a/gosa-core/svn-commit.tmp b/gosa-core/svn-commit.tmp new file mode 100644 index 000000000..e7aabfc44 --- /dev/null +++ b/gosa-core/svn-commit.tmp @@ -0,0 +1,8 @@ +Updated Handling of the registration process +-Moving classes to include. +--This line, and those below, will be ignored-- + +M plugins/generic/dashBoard/class_dashBoard.inc +M plugins/generic/dashBoard/Register/class_RegisterGOsa.inc +A include/class_GOsaRegistration.inc +M include/class_config.inc