X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FDBUpdate.php;h=7b7c3b8c92d97c9ac9a6a636bdf98fa05e36150f;hb=7ea09e666b62cb05c0d00c8e6a46cefbb43b3e38;hp=001df25a811c61c1ff87e30f85f9df680dff40cb;hpb=55325f191bd90a70dd31b066a47c3c2044981278;p=friendica.git diff --git a/src/Worker/DBUpdate.php b/src/Worker/DBUpdate.php index 001df25a81..7b7c3b8c92 100644 --- a/src/Worker/DBUpdate.php +++ b/src/Worker/DBUpdate.php @@ -1,21 +1,39 @@ . + * */ + namespace Friendica\Worker; -use Friendica\BaseObject; -use Friendica\Core\Config; 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() { // Just in case the last update wasn't failed - if (Config::get('system', 'update', Update::SUCCESS, true) != Update::FAILED) { - Update::run(self::getApp()->getBasePath()); + if (DI::config()->get('system', 'update', Update::SUCCESS) != Update::FAILED) { + Update::run(DI::app()->getBasePath()); } } }