Esempio n. 1
0
 /**
  * This constructor sets up session, pulls the current install wizard step and initializes the template
  *
  * @return void
  */
 public function __construct()
 {
     if (!Kohana::config('config.installer_enabled')) {
         throw new Exception('The installer has been administratively disabled. (You can re-enable it in Bluebox/config/config.php)');
     }
     Kohana::config_set('core.site_domain', Bluebox_Installer::guess_site_domain());
     skins::setSkin($this->template);
     parent::__construct();
     /**
      * TODO: Remove me when i18n is more stable
      */
     $this->session->set('lang', 'en');
     // Attempt to retrieve the current Step
     $this->currentStepKey = $this->session->get('installer.currentStepKey', 0);
     $this->currentStep = $this->steps[$this->currentStepKey];
     // If this step is before the environment test the disable logging because we dont know if
     // kohana has write permissions on logs/
     if ($this->currentStepKey > 1 && Kohana::config('core.log_threshold') == 0) {
         Kohana::config_set('core.log_threshold', $this->log_threshold);
     }
     // This is the default list of steps to run, modified to work with the wizard
     $this->pluginEvents = array('core' => Router::$controller, 'coreAction' => Router::$controller . '.' . $this->currentStep);
     if ($this->currentStep != 'finalize') {
         $this->_loadAllModules();
     } else {
         Bluebox_Core::bootstrapPackages(TRUE);
     }
 }