Exemplo n.º 1
0
 /**
  * Returns registry data of setup
  * .
  * @see Tinebase_Application_Json_Abstract
  * 
  * @return mixed array 'variable name' => 'data'
  * 
  * @todo add 'titlePostfix'    => Tinebase_Config::getInstance()->getConfig(Tinebase_Config::PAGETITLEPOSTFIX, NULL, '')->value here?
  */
 public function getRegistryData()
 {
     // anonymous registry
     $registryData = array('configExists' => Setup_Core::configFileExists(), 'version' => array('buildType' => TINE20_BUILDTYPE, 'codeName' => TINE20SETUP_CODENAME, 'packageString' => TINE20SETUP_PACKAGESTRING, 'releaseTime' => TINE20SETUP_RELEASETIME), 'authenticationData' => $this->loadAuthenticationData());
     // authenticated or non existent config
     if (!Setup_Core::configFileExists() || Setup_Core::isRegistered(Setup_Core::USER)) {
         $registryData = array_merge($registryData, $this->checkConfig());
         $registryData = array_merge($registryData, array('acceptedTermsVersion' => !empty($registryData['checkDB']) && $this->_controller->isInstalled('Tinebase') ? Setup_Controller::getInstance()->getAcceptedTerms() : 0, 'setupChecks' => $this->envCheck(), 'configData' => $this->loadConfig(), 'emailData' => !empty($registryData['checkDB']) && $this->_controller->isInstalled('Tinebase') ? $this->getEmailConfig() : array(), 'messengerData' => !empty($registryData['checkDB']) && $this->_controller->isInstalled('Tinebase') ? $this->getMessengerConfig() : array()));
     }
     // if setup user is logged in
     if (Setup_Core::isRegistered(Setup_Core::USER)) {
         $registryData += array('currentAccount' => Setup_Core::getUser());
     }
     return $registryData;
 }