From: hickert Date: Wed, 10 Nov 2010 09:15:56 +0000 (+0000) Subject: Updated registration X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=565eddcc6b812da994a3a60bb999ebd79962161c;p=gosa.git Updated registration -Updated check: isRegistered git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20215 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_GOsaRegistration.inc b/gosa-core/include/class_GOsaRegistration.inc index cdb78ce22..26acccbb1 100644 --- a/gosa-core/include/class_GOsaRegistration.inc +++ b/gosa-core/include/class_GOsaRegistration.inc @@ -52,8 +52,7 @@ class GOsaRegistration function registrationRequired() { - // If we are already registered, then do not ask for regsitration again - if(!empty($this->config->instancePassword)) return(FALSE); + if($this->isInstanceRegistered) return(FALSE); // Seems that we haven't received an instancePassword yet, this can has two reasons: // 1. Not registered yet or registration postponed 2. We do not want to registrate our instance. @@ -70,6 +69,19 @@ class GOsaRegistration } function isInstanceRegistered() + { + if($this->isServerAccessible()){ + + // First check if the server is accessible and if the instance is registered. + return($this->isInstanceRegisteredWithServer()); + }else{ + + // Server is down, now check if we've an instancePassword set in our gosa.conf. + return(!empty($this->config->instancePassword)); + } + } + + function isInstanceRegisteredWithServer() { if($this->isRegistered === NULL){ $con = $this->getConnection();