X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FDBUpdate.php;h=7b7c3b8c92d97c9ac9a6a636bdf98fa05e36150f;hb=33a8d2bc3dfb1e665717892cd113c6ae4dd6a2b4;hp=05bace14679d3da1718d75b2df8f62066e79e110;hpb=d6a82c6c2d7befde9914fce3bd4e3e07b97ca036;p=friendica.git diff --git a/src/Worker/DBUpdate.php b/src/Worker/DBUpdate.php index 05bace1467..7b7c3b8c92 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) != Update::FAILED) { + Update::run(DI::app()->getBasePath()); + } } }