Skip to content

Commit

Permalink
CA Admin and Commands: Use different colors on library install/update…
Browse files Browse the repository at this point in the history
… button/version (#2970)
  • Loading branch information
chrieinv authored Feb 14, 2025
1 parent 14329d9 commit eb94fc3
Show file tree
Hide file tree
Showing 11 changed files with 537 additions and 300 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Symfony\Component\Console\Command\Command as SymfonyCommand;

class H5PLibraryInstall extends Command
{
Expand Down Expand Up @@ -39,16 +40,16 @@ public function handle(): int
$this->warn("Use of h5p.org hub is not enabled. To enable set 'H5P_IS_HUB_ENABLED=true'");
$this->newLine();

return Command::FAILURE;
return SymfonyCommand::FAILURE;
}

$cacheUpdate = $this->call('h5p:library-hub-cache', ['--force' => $this->option('force-cache')]);

if ($cacheUpdate !== Command::SUCCESS) {
if ($cacheUpdate !== SymfonyCommand::SUCCESS) {
return $cacheUpdate;
}

return $this->install() ? Command::SUCCESS : Command::FAILURE;
return $this->install() ? SymfonyCommand::SUCCESS : SymfonyCommand::FAILURE;
}

/**
Expand Down Expand Up @@ -82,7 +83,12 @@ private function install(): bool
$success = false;
$this->error('Failed');
if (isset($result['message'])) {
$this->error(' ' . $result['message']);
$this->error("\t" . $result['message']);
}
if (isset($result['details'])) {
foreach ($result['details'] as $detail) {
$this->error("\t" . $detail);
}
}
}
}
Expand Down
254 changes: 0 additions & 254 deletions sourcecode/apis/contentauthor/app/Console/Commands/H5PLibraryList.php

This file was deleted.

Loading

0 comments on commit eb94fc3

Please sign in to comment.