X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FDBUpdate.php;h=c1f3b12ef05f40a221abeaae2e1a12eb03fa7707;hb=615c6ca6968c6880fd4c23b0ec149bc9469955ed;hp=48c7e7ce6a20ec22fa3bb5389aea01970aeb00c8;hpb=cb3f09ae4f344ff83fca9dc435f3cbad1972737f;p=friendica.git diff --git a/src/Worker/DBUpdate.php b/src/Worker/DBUpdate.php index 48c7e7ce6a..c1f3b12ef0 100644 --- a/src/Worker/DBUpdate.php +++ b/src/Worker/DBUpdate.php @@ -1,16 +1,39 @@ . + * */ + namespace Friendica\Worker; use Friendica\Core\Update; +use Friendica\DI; +/** + * This file is called when the database structure needs to be updated + */ class DBUpdate { public static function execute() { - Update::run(); + // Just in case the last update wasn't failed + if (DI::config()->get('system', 'update', Update::SUCCESS, true) != Update::FAILED) { + Update::run(DI::app()->getBasePath()); + } } }