diff options
| author | 2025-03-22 23:17:52 +0100 | |
|---|---|---|
| committer | 2025-03-22 23:17:52 +0100 | |
| commit | 64bbb42553c925ebf7177945d048c18675188584 (patch) | |
| tree | e9f11e54b44512628304bcd83a1f6f418529099f /cli/manipulate.translation.php | |
| parent | 72ad6e528cc7d65d4d4f401a705cd9e2e6183c1a (diff) | |
Fix CLI flag parsing (#7430)
* Fix CLI flag parsing
fix https://github.com/FreshRSS/FreshRSS/issues/7428
* Fix other places
* Forgotten debugging
Diffstat (limited to 'cli/manipulate.translation.php')
| -rwxr-xr-x | cli/manipulate.translation.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/manipulate.translation.php b/cli/manipulate.translation.php index 061af8c15..434fb61a5 100755 --- a/cli/manipulate.translation.php +++ b/cli/manipulate.translation.php @@ -12,8 +12,8 @@ $cliOptions = new class extends CliOptionsParser { public string $value; public string $language; public string $originLanguage; - public string $revert; - public string $help; + public bool $revert; + public bool $help; public function __construct() { $this->addRequiredOption('action', (new CliOption('action', 'a'))); @@ -30,7 +30,7 @@ $cliOptions = new class extends CliOptionsParser { if (!empty($cliOptions->errors)) { fail('FreshRSS error: ' . array_shift($cliOptions->errors) . "\n" . $cliOptions->usage); } -if (isset($cliOptions->help)) { +if ($cliOptions->help) { manipulateHelp(); } @@ -79,7 +79,7 @@ switch ($cliOptions->action) { break; case 'ignore': if (isset($cliOptions->language) && isset($cliOptions->key)) { - $i18nData->ignore($cliOptions->key, $cliOptions->language, isset($cliOptions->revert)); + $i18nData->ignore($cliOptions->key, $cliOptions->language, $cliOptions->revert); } else { error('You need to specify a valid set of options.'); exit; @@ -87,7 +87,7 @@ switch ($cliOptions->action) { break; case 'ignore_unmodified': if (isset($cliOptions->language)) { - $i18nData->ignore_unmodified($cliOptions->language, isset($cliOptions->revert)); + $i18nData->ignore_unmodified($cliOptions->language, $cliOptions->revert); } else { error('You need to specify a valid set of options.'); exit; |
