protected function render_convert_list()
{
$this->template->assign_vars(array('TITLE' => $this->language->lang('CONVERT_INTRO'), 'BODY' => $this->language->lang('CONVERT_INTRO_BODY'), 'S_LIST' => true));
$convertors = $sort = array();
$get_info = true;
// Global flag
$handle = @opendir($this->phpbb_root_path . 'install/convertors/');
if (!$handle) {
die('Unable to access the convertors directory');
}
while ($entry = readdir($handle)) {
if (preg_match('/^convert_([a-z0-9_]+).' . $this->php_ext . '$/i', $entry, $m)) {
$phpbb_root_path = $this->phpbb_root_path;
// These globals are required
$phpEx = $this->php_ext;
// See above
include_once $this->phpbb_root_path . 'install/convertors/' . $entry;
if (isset($convertor_data)) {
$sort[strtolower($convertor_data['forum_name'])] = sizeof($convertors);
$convertors[] = array('tag' => $m[1], 'forum_name' => $convertor_data['forum_name'], 'version' => $convertor_data['version'], 'dbms' => $convertor_data['dbms'], 'dbhost' => $convertor_data['dbhost'], 'dbport' => $convertor_data['dbport'], 'dbuser' => $convertor_data['dbuser'], 'dbpasswd' => $convertor_data['dbpasswd'], 'dbname' => $convertor_data['dbname'], 'table_prefix' => $convertor_data['table_prefix'], 'author' => $convertor_data['author']);
}
unset($convertor_data);
}
}
closedir($handle);
@ksort($sort);
foreach ($sort as $void => $index) {
$this->template->assign_block_vars('convertors', array('AUTHOR' => $convertors[$index]['author'], 'SOFTWARE' => $convertors[$index]['forum_name'], 'VERSION' => $convertors[$index]['version'], 'U_CONVERT' => $this->controller_helper->route('phpbb_convert_settings', array('convertor' => $convertors[$index]['tag']))));
}
return $this->controller_helper->render('installer_convert.html', 'SUB_INTRO', true);
}