]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #10036 from fabrixxm/fix-installer-themes
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 12 Mar 2021 19:43:58 +0000 (14:43 -0500)
committerGitHub <noreply@github.com>
Fri, 12 Mar 2021 19:43:58 +0000 (14:43 -0500)
Installer: install themes as last action

src/Console/Storage.php
src/Core/StorageManager.php

index d0a2a66637a19c831997cbded40832ec42c29dfd..a048d74ff8a75dfa8f4b80d90b0d3ffeff22bfc0 100644 (file)
@@ -23,6 +23,7 @@ namespace Friendica\Console;
 
 use Asika\SimpleConsole\CommandArgsException;
 use Friendica\Core\StorageManager;
+use Friendica\Model\Storage\StorageException;
 
 /**
  * tool to manage storage backend and stored data from CLI
@@ -165,6 +166,10 @@ HELP;
                $current = $this->storageManager->getBackend();
                $total = 0;
 
+               if (is_null($current)) {
+                       throw new StorageException(sprintf("Cannot move to legacy storage. Please select a storage backend."));
+               }
+
                do {
                        $moved = $this->storageManager->move($current, $tables, $this->getOption('n', 5000));
                        if ($moved) {
index b832b20fa303e320ec7682c549363f2f6b7e496e..6fadcb52bc482e7d2c65930c2744fc687ca0ff90 100644 (file)
@@ -305,7 +305,7 @@ class StorageManager
                                        $data = $source->get($sourceRef);
                                }
 
-                               $this->logger->info('Save data to new backend.', ['newBackend' => $destination]);
+                               $this->logger->info('Save data to new backend.', ['newBackend' => $destination::getName()]);
                                $destinationRef = $destination->put($data);
                                $this->logger->info('Saved data.', ['newReference' => $destinationRef]);