]> git.mxchange.org Git - friendica.git/blob - src/Worker/DBUpdate.php
wrapping up 2019.12
[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
12 class DBUpdate extends BaseObject
13 {
14         public static function execute()
15         {
16                 // Just in case the last update wasn't failed
17                 if (Config::get('system', 'update', Update::SUCCESS, true) != Update::FAILED) {
18                         Update::run(self::getApp()->getBasePath());
19                 }
20         }
21 }