]> git.mxchange.org Git - friendica.git/commitdiff
Improved code
authorMichael <heluecht@pirati.ca>
Sat, 16 May 2020 10:04:09 +0000 (10:04 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 16 May 2020 10:04:09 +0000 (10:04 +0000)
src/Database/DBStructure.php

index 352e8b0f8791af06b93a7bf11e2ddf9b84db55cb..dcb59fc9f2a68cf170c649abe5a9cceb520cbd83 100644 (file)
@@ -291,13 +291,11 @@ class DBStructure
         */
        public static function update($basePath, $verbose, $action, $install = false, array $tables = null, array $definition = null)
        {
-               if (!$install) {
+               if ($action && !$install) {
                        if (self::isUpdating()) {
                                return DI::l10n()->t('Another database update is currently running.');
                        }
-               }
 
-               if ($action && !$install) {
                        DI::config()->set('system', 'maintenance', 1);
                        DI::config()->set('system', 'maintenance_reason', DI::l10n()->t('%s: Database update', DateTimeFormat::utcNow() . ' ' . date('e')));
                }