mirror of
https://github.com/friendica/friendica
synced 2025-04-26 13:50:11 +00:00
Apply suggestions
This commit is contained in:
parent
072464119a
commit
b439df892a
14 changed files with 69 additions and 66 deletions
|
@ -160,10 +160,10 @@ class Update
|
|||
Logger::warning('Pre update failed', ['version' => $version]);
|
||||
DI::config()->set('system', 'update', Update::FAILED);
|
||||
DI::lock()->release('dbupdate');
|
||||
DI::config()->transactional()
|
||||
DI::config()->beginTransaction()
|
||||
->set('system', 'maintenance', false)
|
||||
->delete('system', 'maintenance_reason')
|
||||
->save();
|
||||
->commit();
|
||||
return $r;
|
||||
} else {
|
||||
Logger::notice('Pre update executed.', ['version' => $version]);
|
||||
|
@ -183,10 +183,10 @@ class Update
|
|||
Logger::error('Update ERROR.', ['from' => $stored, 'to' => $current, 'retval' => $retval]);
|
||||
DI::config()->set('system', 'update', Update::FAILED);
|
||||
DI::lock()->release('dbupdate');
|
||||
DI::config()->transactional()
|
||||
DI::config()->beginTransaction()
|
||||
->set('system', 'maintenance', false)
|
||||
->delete('system', 'maintenance_reason')
|
||||
->save();
|
||||
->commit();
|
||||
return $retval;
|
||||
} else {
|
||||
Logger::notice('Database structure update finished.', ['from' => $stored, 'to' => $current]);
|
||||
|
@ -202,10 +202,10 @@ class Update
|
|||
Logger::warning('Post update failed', ['version' => $version]);
|
||||
DI::config()->set('system', 'update', Update::FAILED);
|
||||
DI::lock()->release('dbupdate');
|
||||
DI::config()->transactional()
|
||||
DI::config()->beginTransaction()
|
||||
->set('system', 'maintenance', false)
|
||||
->delete('system', 'maintenance_reason')
|
||||
->save();
|
||||
->commit();
|
||||
return $r;
|
||||
} else {
|
||||
DI::config()->set('system', 'build', $version);
|
||||
|
@ -216,10 +216,10 @@ class Update
|
|||
DI::config()->set('system', 'build', $current);
|
||||
DI::config()->set('system', 'update', Update::SUCCESS);
|
||||
DI::lock()->release('dbupdate');
|
||||
DI::config()->transactional()
|
||||
DI::config()->beginTransaction()
|
||||
->set('system', 'maintenance', false)
|
||||
->delete('system', 'maintenance_reason')
|
||||
->save();
|
||||
->commit();
|
||||
|
||||
Logger::notice('Update success.', ['from' => $stored, 'to' => $current]);
|
||||
if ($sendMail) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue