protected function load_lang(HTTPRequestCustom $request)
 {
     $locale = TextHelper::htmlspecialchars($request->get_string('lang', UpdateController::DEFAULT_LOCALE));
     LangLoader::set_locale($locale);
     UpdateUrlBuilder::set_locale($locale);
     $this->lang = LangLoader::get('update', 'update');
 }
 private function add_navigation(Template $view)
 {
     $form = new HTMLForm('preambleForm', UpdateUrlBuilder::server_configuration()->rel(), false);
     $action_fieldset = new FormFieldsetSubmit('actions');
     $next = new FormButtonSubmitCssImg($this->lang['step.next'], 'fa fa-arrow-right', 'introduction');
     $action_fieldset->add_element($next);
     $form->add_fieldset($action_fieldset);
     $view->put_all(array('C_PUT_UNDER_MAINTENANCE' => !MaintenanceConfig::load()->is_under_maintenance(), 'SERVER_FORM' => $form->display()));
 }
 private function add_navigation(Template $view)
 {
     $form = new HTMLForm('continueForm', '#error', false);
     $action_fieldset = new FormFieldsetSubmit('actions');
     $back = new FormButtonLinkCssImg($this->lang['step.previous'], UpdateServices::database_config_file_checked() ? UpdateUrlBuilder::server_configuration() : UpdateUrlBuilder::database(), 'fa fa-arrow-left');
     $action_fieldset->add_element($back);
     $this->submit = new FormButtonSubmitCssImg($this->lang['step.next'], 'fa fa-arrow-right', 'finish');
     $action_fieldset->add_element($this->submit);
     $form->add_fieldset($action_fieldset);
     $view->put('SERVER_FORM', $form->display());
 }
 private function handle_form()
 {
     if ($this->server_conf->is_php_compatible() && PHPBoostFoldersPermissions::validate()) {
         if (UpdateServices::database_config_file_checked()) {
             $service = new UpdateServices();
             $service->generate_update_token();
             AppContext::get_response()->redirect(UpdateUrlBuilder::update());
         }
         AppContext::get_response()->redirect(UpdateUrlBuilder::database());
     }
 }
 public function __construct($step_number, $step_title, Template $view)
 {
     $this->load_language_resources();
     $this->init_response($step_number, $view);
     $env = new UpdateDisplayGraphicalEnvironment();
     $this->add_language_bar();
     $this->init_steps();
     $this->update_progress_bar();
     $this->full_view->put_all(array('RESTART' => UpdateUrlBuilder::introduction()->rel(), 'STEP_TITLE' => $step_title, 'C_HAS_PREVIOUS_STEP' => false, 'C_HAS_NEXT_STEP' => false, 'L_XML_LANGUAGE' => LangLoader::get_message('xml_lang', 'main'), 'PROGRESSION' => floor(100 * $this->current_step / $this->nb_steps)));
     parent::__construct($env, $this->full_view);
 }
 public static function set_locale($locale)
 {
     self::$locale = $locale;
 }