mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 15:16:30 +02:00
Issue #1336 - Allow forum update to continue if empty tables found.
This commit is contained in:
@@ -190,11 +190,18 @@ function step2()
|
|||||||
$ret = '';
|
$ret = '';
|
||||||
$failed = false;
|
$failed = false;
|
||||||
$text = '';
|
$text = '';
|
||||||
|
$sql = e107::getDb();
|
||||||
foreach ($tabList as $name => $rename)
|
foreach ($tabList as $name => $rename)
|
||||||
{
|
{
|
||||||
$message = 'Creating table ' . ($rename ? $rename : $name);
|
$message = 'Creating table ' . ($rename ? $rename : $name);
|
||||||
|
|
||||||
$result = $db -> createTable(e_PLUGIN . 'forum/forum_sql.php', $name, true, $rename);
|
if($sql->isTable($name) && $sql->isEmpty($name))
|
||||||
|
{
|
||||||
|
$mes -> addSuccess("Skipping table ".$name." (already exists)");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $db->createTable(e_PLUGIN . 'forum/forum_sql.php', $name, true, $rename);
|
||||||
if ($result === true)
|
if ($result === true)
|
||||||
{
|
{
|
||||||
$mes -> addSuccess($message);
|
$mes -> addSuccess($message);
|
||||||
@@ -221,9 +228,9 @@ function step2()
|
|||||||
$ns -> tablerender('Step 2: Forum table creation', $mes -> render() . $text);
|
$ns -> tablerender('Step 2: Forum table creation', $mes -> render() . $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME - use e107::getPlugin()->manage_extended_field('add', $name, $attrib,
|
|
||||||
// $source)
|
|
||||||
|
|
||||||
|
|
||||||
|
// FIXME - use e107::getPlugin()->manage_extended_field('add', $name, $attrib, $source)
|
||||||
function step3()
|
function step3()
|
||||||
{
|
{
|
||||||
$ns = e107::getRender();
|
$ns = e107::getRender();
|
||||||
|
Reference in New Issue
Block a user