Browse Source

Code standards

pull/6482/head
fabrixxm 2 years ago
committed by Hypolite Petovan
parent
commit
f7b6fef197
2 changed files with 5 additions and 5 deletions
  1. +2
    -2
      src/Core/Console/Storage.php
  2. +3
    -3
      src/Core/StorageManager.php

+ 2
- 2
src/Core/Console/Storage.php View File

@ -94,7 +94,7 @@ HELP;
$name = $this->args[1];
$class = StorageManager::getByName($name);
if ($class === "") {
if ($class === '') {
$this->out($name . ' is not a registered backend.');
return -1;
}
@ -111,6 +111,6 @@ HELP;
$current = StorageManager::getBackend();
$r = StorageManager::move($current);
$this->out(sprintf("Moved %d files", $r));
$this->out(sprintf('Moved %d files', $r));
}
}

+ 3
- 3
src/Core/StorageManager.php View File

@ -130,10 +130,10 @@ class StorageManager
}
$ref = $dest::put($data);
if ($ref !== "") {
$ru = DBA::update($table, ["backend-class" => $dest, "backend-ref" => $ref, "data" => ""], ["id" => $id]);
if ($ref !== '') {
$ru = DBA::update($table, ['backend-class' => $dest, 'backend-ref' => $ref, 'data' => ''], ['id' => $id]);
if ($ru) {
if ($backendClass !== "") {
if ($backendClass !== '') {
$backendClass::delete($backendRef);
}
$moved++;


Loading…
Cancel
Save