friendica/src/Worker/DBUpdate.php

22 lines
494 B
PHP
Raw Normal View History

2017-11-18 02:31:33 -05:00
<?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;
2017-11-18 02:31:33 -05:00
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(self::getApp()->getBasePath());
}
2017-11-18 02:31:33 -05:00
}
}