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()); } }
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()); }
public function __construct($locale = '') { $this->token = new File(PATH_TO_ROOT . '/cache/.update_token'); $this->update_followed_file = new File(PATH_TO_ROOT . '/update/update_followed.txt'); $this->update_followed_file->delete(); self::$db_utils = PersistenceContext::get_dbms_utils(); self::$db_querier = PersistenceContext::get_querier(); if (!empty($locale)) { LangLoader::set_locale($locale); } $this->messages = LangLoader::get('update', 'update'); }