X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FDBUpdate.php;h=322fa349298bae9da171c7109a1ad2687fc8a0e3;hb=2647514603852fe5fb9f47f0bf153dd20c124ce6;hp=05bace14679d3da1718d75b2df8f62066e79e110;hpb=83f49fcf15c29263f1448b728d60245b90f847fa;p=friendica.git diff --git a/src/Worker/DBUpdate.php b/src/Worker/DBUpdate.php index 05bace1467..322fa34929 100644 --- a/src/Worker/DBUpdate.php +++ b/src/Worker/DBUpdate.php @@ -1,17 +1,39 @@ . + * */ + namespace Friendica\Worker; -use Friendica\BaseObject; use Friendica\Core\Update; +use Friendica\DI; -class DBUpdate extends BaseObject +/** + * This file is called when the database structure needs to be updated + */ +class DBUpdate { public static function execute() { - Update::run(self::getApp()->getBasePath()); + // 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()); + } } }