friendica/src/Worker/DBUpdate.php
Philipp Holzer 1de3f186d7
Introduce new DI container
- Adding Friendica\DI class for getting dynamic classes
- Replacing BaseObject::getApp() with this class
2019-12-29 20:16:55 +01:00

23 lines
507 B
PHP

<?php
/**
* @file src/Worker/DBUpdate.php
* @brief This file is called when the database structure needs to be updated
*/
namespace Friendica\Worker;
use Friendica\BaseObject;
use Friendica\Core\Config;
use Friendica\Core\Update;
use Friendica\DI;
class DBUpdate extends BaseObject
{
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(DI::app()->getBasePath());
}
}
}