mirror of
https://github.com/friendica/friendica
synced 2025-01-20 16:59:46 +00:00
don't try to use the Config table if it doesn't exist
This commit is contained in:
parent
a9c0636573
commit
aeb3c7e96c
1 changed files with 5 additions and 2 deletions
|
@ -132,7 +132,7 @@ class Update
|
||||||
$build = DI::config()->get('system', 'build');
|
$build = DI::config()->get('system', 'build');
|
||||||
|
|
||||||
if (empty($build)) {
|
if (empty($build)) {
|
||||||
// legacy option - check if there's something in the Config table
|
// legacy option - check if the Config table exists
|
||||||
if (DBStructure::existsTable('config')) {
|
if (DBStructure::existsTable('config')) {
|
||||||
$dbConfig = DBA::selectFirst('config', ['v'], ['cat' => 'system', 'k' => 'build']);
|
$dbConfig = DBA::selectFirst('config', ['v'], ['cat' => 'system', 'k' => 'build']);
|
||||||
if (!empty($dbConfig)) {
|
if (!empty($dbConfig)) {
|
||||||
|
@ -141,7 +141,10 @@ class Update
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($build) || ($build > DB_UPDATE_VERSION)) {
|
if (empty($build) || ($build > DB_UPDATE_VERSION)) {
|
||||||
|
// legacy option - check if the Config table exists
|
||||||
|
if (DBStructure::existsTable('config')) {
|
||||||
DI::config()->set('system', 'build', DB_UPDATE_VERSION - 1);
|
DI::config()->set('system', 'build', DB_UPDATE_VERSION - 1);
|
||||||
|
}
|
||||||
$build = DB_UPDATE_VERSION - 1;
|
$build = DB_UPDATE_VERSION - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue