Code

Updated Handling of the registration process
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 5 Nov 2010 16:24:16 +0000 (16:24 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 5 Nov 2010 16:24:16 +0000 (16:24 +0000)
-Moving classes to include.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20198 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_GOsaRegistration.inc [new file with mode: 0644]
gosa-core/include/class_config.inc
gosa-core/plugins/generic/dashBoard/Register/class_RegisterGOsa.inc
gosa-core/plugins/generic/dashBoard/class_dashBoard.inc
gosa-core/svn-commit.tmp [new file with mode: 0644]

diff --git a/gosa-core/include/class_GOsaRegistration.inc b/gosa-core/include/class_GOsaRegistration.inc
new file mode 100644 (file)
index 0000000..2685bca
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+
+
+class GOsaRegistration 
+{
+    
+
+} 
+
+
+
+?>
index 329ae0fd014d50103cd7f0187edba8b2b41ff36c..a630ab8a98b542655cc284c95024727e3c0fe61a 100644 (file)
@@ -91,6 +91,7 @@ class config  {
 
         // Load configuration registry
         $this->configRegistry = new configRegistry($this);
+        $this->registration = new GOsaRegistration($this);
     }
 
 
index c95f4a82d4a25a9d26959432aa2a6f3e81070292..d79cce7c7667540c5ca4d2df2918d2f69c821f2d 100644 (file)
@@ -2,6 +2,7 @@
 
 class GOsaRegistration extends plugin
 {
+
     static function registerGOsa($config, $uuid, $type, $userData = array())
     {
         echo "<br>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');
index a983faf369182ef6f200fc8d1032bbccc2bc6d22..b68367460bc179d6a4e8435bb6371ac8f95f3bd6 100644 (file)
@@ -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 (file)
index 0000000..e7aabfc
--- /dev/null
@@ -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