getDB();
// parse table/view info into objects
$infos = array();
foreach ($TABLESDEF as $tabledef) {
if ($tabledef->getName() == 'table') {
$info = TableInfo::fromXML($tabledef);
$basename = $info->getName();
$info->setName(DBHelper::buildModTableName($MOD,$info));
DBHelper::globalizeModRefs($MOD,$info);
$infos[$basename] = $info;
}
if ($tabledef->getName() == 'view') {
$info = ViewInfo::fromXML($tabledef);
$basename = $info->getName();
$info->setName(DBHelper::buildModTableName($MOD,$info));
DBHelper::globalizeModRefs($MOD,$info);
$infos[$basename] = $info;
}
}
unset($info);
switch ($STEP) {
case 1:
echo '
';
// ### CREATE TABLE/VIEW categorys ###
$info = $infos['categorys'];
echo '- '.$LANG->tr('txt_db_will_create_table', [$info->getName()])."
\n";
// ### CREATE TABLE/VIEW boards ###
$info = $infos['boards'];
echo '- '.$LANG->tr('txt_db_will_create_table', [$info->getName()])."
\n";
// ### CREATE TABLE/VIEW boardacls ###
$info = $infos['boardacls'];
echo '- '.$LANG->tr('txt_db_will_create_table', [$info->getName()])."
\n";
// ### CREATE TABLE/VIEW topics ###
$info = $infos['topics'];
echo '- '.$LANG->tr('txt_db_will_create_table', [$info->getName()])."
\n";
// ### CREATE TABLE/VIEW topicpolls ###
$info = $infos['topicpolls'];
echo '- '.$LANG->tr('txt_db_will_create_table', [$info->getName()])."
\n";
// ### CREATE TABLE/VIEW topicpolloptions ###
$info = $infos['topicpolloptions'];
echo '- '.$LANG->tr('txt_db_will_create_table', [$info->getName()])."
\n";
// ### CREATE TABLE/VIEW topicpollvotes ###
$info = $infos['topicpollvotes'];
echo '- '.$LANG->tr('txt_db_will_create_table', [$info->getName()])."
\n";
// ### CREATE TABLE/VIEW posts ###
$info = $infos['posts'];
echo '- '.$LANG->tr('txt_db_will_create_table', [$info->getName()])."
\n";
// ### CREATE TABLE/VIEW postvotes ###
$info = $infos['postvotes'];
echo '- '.$LANG->tr('txt_db_will_create_table', [$info->getName()])."
\n";
// ### CREATE TABLE/VIEW postmedias ###
$info = $infos['postmedias'];
echo '- '.$LANG->tr('txt_db_will_create_table', [$info->getName()])."
\n";
echo '
';
break;
case 2:
echo '';
// ### CREATE TABLE/VIEW categorys ###
$info = $infos['categorys'];
$db->createTable($info);
echo '- '.$LANG->tr('txt_db_table_created', [$info->getName()])."

\n";
// ### CREATE TABLE/VIEW boards ###
$info = $infos['boards'];
$db->createTable($info);
echo '- '.$LANG->tr('txt_db_table_created', [$info->getName()])."

\n";
// ### CREATE TABLE/VIEW boardacls ###
$info = $infos['boardacls'];
$db->createTable($info);
echo '- '.$LANG->tr('txt_db_table_created', [$info->getName()])."

\n";
// ### CREATE TABLE/VIEW topics ###
$info = $infos['topics'];
$db->createTable($info);
echo '- '.$LANG->tr('txt_db_table_created', [$info->getName()])."

\n";
// ### CREATE TABLE/VIEW topicpolls ###
$info = $infos['topicpolls'];
$db->createTable($info);
echo '- '.$LANG->tr('txt_db_table_created', [$info->getName()])."

\n";
// ### CREATE TABLE/VIEW topicpolloptions ###
$info = $infos['topicpolloptions'];
$db->createTable($info);
echo '- '.$LANG->tr('txt_db_table_created', [$info->getName()])."

\n";
// ### CREATE TABLE/VIEW topicpollvotes ###
$info = $infos['topicpollvotes'];
$db->createTable($info);
echo '- '.$LANG->tr('txt_db_table_created', [$info->getName()])."

\n";
// ### CREATE TABLE/VIEW posts ###
$info = $infos['posts'];
$db->createTable($info);
echo '- '.$LANG->tr('txt_db_table_created', [$info->getName()])."

\n";
// ### CREATE TABLE/VIEW postvotes ###
$info = $infos['postvotes'];
$db->createTable($info);
echo '- '.$LANG->tr('txt_db_table_created', [$info->getName()])."

\n";
// ### CREATE TABLE/VIEW postmedias ###
$info = $infos['postmedias'];
$db->createTable($info);
echo '- '.$LANG->tr('txt_db_table_created', [$info->getName()])."

\n";
echo '
';
break;
}