]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/DBUpdate.php
Don't add contacts when not needed
[friendica.git] / src / Worker / DBUpdate.php
index fcf07c0b6506aee0823eb150abc61f72a8ae4b56..5f7dfcb79600df2fc9ffe458e6d4d556869fae7d 100644 (file)
@@ -7,15 +7,15 @@ namespace Friendica\Worker;
 
 use Friendica\Core\Config;
 use Friendica\Core\Update;
+use Friendica\DI;
 
 class DBUpdate
 {
        public static function execute()
        {
-               // We are deleting the latest dbupdate entry.
-               // This is done to avoid endless loops because the update was interupted.
-               Config::delete('database', 'dbupdate_'.DB_UPDATE_VERSION);
-
-               Update::run();
+               // Just in case the last update wasn't failed
+               if (Config::get('system', 'update', Update::SUCCESS, true) != Update::FAILED) {
+                       Update::run(DI::app()->getBasePath());
+               }
        }
 }