]> git.mxchange.org Git - friendica.git/blobdiff - src/Console/Storage.php
Remove deprecated code
[friendica.git] / src / Console / Storage.php
index f4b4de562e8e77ca1edafabd4c0cce7eb236fb41..30a7fc713a1838f50d74929c5d788e2bcfc545a6 100644 (file)
@@ -6,7 +6,7 @@ use Asika\SimpleConsole\CommandArgsException;
 use Friendica\Core\StorageManager;
 
 /**
- * @brief tool to manage storage backend and stored data from CLI
+ * tool to manage storage backend and stored data from CLI
  *
  */
 class Storage extends \Asika\SimpleConsole\Console
@@ -88,7 +88,7 @@ HELP;
                $isregisterd = false;
                foreach ($this->storageManager->listBackends() as $name => $class) {
                        $issel = ' ';
-                       if ($current === $class) {
+                       if ($current::getName() == $name) {
                                $issel = '*';
                                $isregisterd = true;
                        };
@@ -130,7 +130,6 @@ HELP;
 
        protected function doMove()
        {
-               $tables = null;
                if (count($this->args) < 1 || count($this->args) > 2) {
                        throw new CommandArgsException('Invalid arguments');
                }
@@ -141,6 +140,8 @@ HELP;
                                throw new CommandArgsException('Invalid table');
                        }
                        $tables = [$table];
+               } else {
+                       $tables = StorageManager::TABLES;
                }
 
                $current = $this->storageManager->getBackend();