1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-11 00:54:49 +02:00

Issue #1936 Fix for the 'stuck' database update button on core update page. Temporarily modify core_sql.php to test.

This commit is contained in:
Cameron
2017-11-15 14:48:12 -08:00
parent cdc66797f3
commit af959b0c00
2 changed files with 31 additions and 11 deletions

View File

@@ -411,8 +411,10 @@ class db_verify
{
foreach($this->results as $tabs => $field)
{
$file = varset($this->results[$tabs]['_file']);
if(varset($this->errors[$tabs]['_status']) === 'missing_table') // Missing Table
$file = varset($this->results[$tabs]['_file']);
$errorStatus = !empty($this->errors[$tabs]['_status']) ? $this->errors[$tabs]['_status'] : null;
if($errorStatus === 'missing_table') // Missing Table
{
$this->fixList[$file][$tabs]['all'][] = 'create';
}
@@ -421,7 +423,11 @@ class db_verify
foreach($field as $k=>$f)
{
if($f['_status']=='ok') continue;
$this->fixList[$f['_file']][$tabs][$k][] = $this->modes[$f['_status']];
$status = $f['_status'];
if(!empty($this->modes[$status]))
{
$this->fixList[$f['_file']][$tabs][$k][] = $this->modes[$status];
}
}
}
}
@@ -720,7 +726,8 @@ class db_verify
{
$id = $this->getId($this->sqlFileTables[$j]['tables'],$table);
$toFix = count($val);
foreach($val as $field=>$fixes)
{
foreach($fixes as $mode)
@@ -773,7 +780,8 @@ class db_verify
if(e107::getDb()->gen($query) !== false)
{
$log->addDebug(LAN_UPDATED.' ['.$query.']');
$log->addDebug(LAN_UPDATED.' ['.$query.']');
$toFix--;
}
else
{
@@ -786,8 +794,14 @@ class db_verify
}
}
}
} //
if(empty($toFix))
{
unset($this->errors[$table], $this->fixList[$j][$table]); // remove from error list since we are using a singleton
}
} //
}
$log->flushMessages("Database Table(s) Modified");