X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FDBUpdate.php;h=c1f3b12ef05f40a221abeaae2e1a12eb03fa7707;hb=38cf0666bd7a6537a5a6af19b5bd6073ef12e82f;hp=ae25760c8765acd69c32fbbeee68d3bbe40cb1f1;hpb=50ba02809425b9cc166909bc30100ec2c4e338e1;p=friendica.git diff --git a/src/Worker/DBUpdate.php b/src/Worker/DBUpdate.php index ae25760c87..c1f3b12ef0 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, true) != Update::FAILED) { + Update::run(DI::app()->getBasePath()); + } } }