public function finish()
{
$this->setup_navigation('finish');
$this->template->assign_vars(array('TITLE' => $this->language->lang('CONVERT_COMPLETE'), 'BODY' => $this->language->lang('CONVERT_COMPLETE_EXPLAIN')));
// If we reached this step (conversion completed) we want to purge the cache and log the user out.
// This is for making sure the session get not screwed due to the 3.0.x users table being completely new.
$this->cache->purge();
$this->installer_cache->purge();
require_once $this->phpbb_root_path . 'includes/constants.' . $this->php_ext;
require_once $this->phpbb_root_path . 'includes/functions_convert.' . $this->php_ext;
$sql = 'SELECT config_value
FROM ' . $this->config_table . '
WHERE config_name = \'search_type\'';
$result = $this->db->sql_query($sql);
if ($this->db->sql_fetchfield('config_value') != 'fulltext_mysql') {
$this->template->assign_vars(array('S_ERROR_BOX' => true, 'ERROR_TITLE' => $this->language->lang('SEARCH_INDEX_UNCONVERTED'), 'ERROR_MSG' => $this->language->lang('SEARCH_INDEX_UNCONVERTED_EXPLAIN')));
}
$this->db->sql_freeresult($result);
switch ($this->db->get_sql_layer()) {
case 'sqlite3':
$this->db->sql_query('DELETE FROM ' . $this->session_keys_table);
$this->db->sql_query('DELETE FROM ' . $this->session_table);
break;
default:
$this->db->sql_query('TRUNCATE TABLE ' . $this->session_keys_table);
$this->db->sql_query('TRUNCATE TABLE ' . $this->session_table);
break;
}
return $this->controller_helper->render('installer_convert.html', 'CONVERT_COMPLETE');
}