X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FDBUpdate.php;h=7b7c3b8c92d97c9ac9a6a636bdf98fa05e36150f;hb=423e60174ef7ae4948fa44ac725c8bc54234966a;hp=ae25760c8765acd69c32fbbeee68d3bbe40cb1f1;hpb=8a46c786f37550160d81e7b7ecbcacb4c9fff493;p=friendica.git diff --git a/src/Worker/DBUpdate.php b/src/Worker/DBUpdate.php index ae25760c87..7b7c3b8c92 100644 --- a/src/Worker/DBUpdate.php +++ b/src/Worker/DBUpdate.php @@ -1,17 +1,39 @@ . + * */ + namespace Friendica\Worker; -use Friendica\Core\Config; 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) != Update::FAILED) { + Update::run(DI::app()->getBasePath()); + } } }