phpbb\install\module\obtain_data\task\obtain_database_data::process_form PHP Method

process_form() protected method

Process form data
protected process_form ( )
    protected function process_form()
    {
        // Collect database data
        $dbms = $this->io_handler->get_input('dbms', '');
        $dbhost = $this->io_handler->get_input('dbhost', '', true);
        $dbport = $this->io_handler->get_input('dbport', '');
        $dbuser = $this->io_handler->get_input('dbuser', '');
        $dbpasswd = $this->io_handler->get_raw_input('dbpasswd', '');
        $dbname = $this->io_handler->get_input('dbname', '');
        $table_prefix = $this->io_handler->get_input('table_prefix', '');
        // Check database data
        $user_data_vaild = $this->check_database_data($dbms, $dbhost, $dbport, $dbuser, $dbpasswd, $dbname, $table_prefix);
        // Save database data if it is correct
        if ($user_data_vaild) {
            $this->install_config->set('dbms', $dbms);
            $this->install_config->set('dbhost', $dbhost);
            $this->install_config->set('dbport', $dbport);
            $this->install_config->set('dbuser', $dbuser);
            $this->install_config->set('dbpasswd', $dbpasswd);
            $this->install_config->set('dbname', $dbname);
            $this->install_config->set('table_prefix', $table_prefix);
        } else {
            $this->request_form_data(true);
        }
    }