]> git.mxchange.org Git - friendica.git/blob - src/Worker/DBUpdate.php
84159eb433c5b5d7fcc1f4cd91e0697910b20524
[friendica.git] / src / Worker / DBUpdate.php
1 <?php
2 /**
3  * @file src/Worker/DBUpdate.php
4  * @brief This file is called when the database structure needs to be updated
5  */
6 namespace Friendica\Worker;
7
8 use Friendica\BaseObject;
9 use Friendica\Core\Config;
10 use Friendica\Core\Update;
11 use Friendica\DI;
12
13 class DBUpdate extends BaseObject
14 {
15         public static function execute()
16         {
17                 // Just in case the last update wasn't failed
18                 if (Config::get('system', 'update', Update::SUCCESS, true) != Update::FAILED) {
19                         Update::run(DI::app()->getBasePath());
20                 }
21         }
22 }