示例#1
0
 /**
  * Perform installation.
  */
 function execute()
 {
     $templateMgr = TemplateManager::getManager($this->_request);
     $installer = new Install($this->_data);
     if ($installer->execute()) {
         if (!$installer->wroteConfig()) {
             // Display config file contents for manual replacement
             $templateMgr->assign(array('writeConfigFailed' => true, 'configFileContents' => $installer->getConfigContents()));
         }
         $templateMgr->display('install/installComplete.tpl');
     } else {
         switch ($installer->getErrorType()) {
             case INSTALLER_ERROR_DB:
                 $this->dbInstallError($installer->getErrorMsg());
                 break;
             default:
                 $this->installError($installer->getErrorMsg());
                 break;
         }
     }
     $installer->destroy();
 }
示例#2
0
 /**
  * Perform installation.
  */
 function execute()
 {
     $templateMgr =& TemplateManager::getManager();
     $installer = new Install($this->_data);
     // FIXME Use logger?
     if ($installer->execute()) {
         if ($this->getData('manualInstall')) {
             // Display SQL statements that would have been executed during installation
             $templateMgr->assign(array('manualInstall' => true, 'installSql' => $installer->getSQL()));
         }
         if (!$installer->wroteConfig()) {
             // Display config file contents for manual replacement
             $templateMgr->assign(array('writeConfigFailed' => true, 'configFileContents' => $installer->getConfigContents()));
         }
         $templateMgr->display('install/installComplete.tpl');
     } else {
         switch ($installer->getErrorType()) {
             case INSTALLER_ERROR_DB:
                 $this->dbInstallError($installer->getErrorMsg());
                 break;
             default:
                 $this->installError($installer->getErrorMsg());
                 break;
         }
     }
     $installer->destroy();
 }