/** * If chain of steps is already in session, */ protected function buildStepChain() { $this->checkSessionStarted(); if (!$this->forceFreshInstall && $_SESSION[self::SESSION_KEY]['steps'] instanceof AbstractStep) { $this->firstStep = $_SESSION[self::SESSION_KEY]['steps']; $this->firstStep->propagateSettings($this->pixie, $this->view, false); } else { $adminStep = new AdminCredentialsStep(); $this->addStep($adminStep)->addStep(new DBSettingsStep())->addStep(new EmailSettingsStep())->addStep(new ConfirmationStep()); $this->firstStep->start(); $this->firstStep->propagateSettings($this->pixie, $this->view); $nextStep = null; if ($this->isReinstallation) { $params = $this->pixie->config->get('parameters'); $pass = $params['installer_password']; $adminStep->execute('POST', ['password' => $pass, 'password_confirmation' => $pass]); $nextStep = $adminStep->getNextStep(); $nextStep->start(); } $_SESSION[self::SESSION_KEY]['steps'] = $this->firstStep; if ($this->isReinstallation) { throw new RedirectException('/install/' . $nextStep->getName()); } } }
/** * If chain of steps is already in session, */ protected function buildStepChain() { $this->checkSessionStarted(); if ($_SESSION[self::SESSION_KEY]['steps'] instanceof AbstractStep) { $this->firstStep = $_SESSION[self::SESSION_KEY]['steps']; $this->firstStep->propagateSettings($this->pixie, $this->view, false); } else { $this->addStep(new DBSettingsStep())->addStep(new EmailSettingsStep())->addStep(new ConfirmationStep()); $this->firstStep->start(); $this->firstStep->propagateSettings($this->pixie, $this->view); $_SESSION[self::SESSION_KEY]['steps'] = $this->firstStep; } }