diff options
| author | 2025-11-11 08:17:12 +0100 | |
|---|---|---|
| committer | 2025-11-11 08:17:12 +0100 | |
| commit | a18c35046daee15e7ac5f85db290d54541a03e3c (patch) | |
| tree | ec638cf7c93537a4f81b27216097d8509252eb81 /cli | |
| parent | 5e622c60fa5c40793138807280319f7e84d00cc6 (diff) | |
Housekeeping lib_rss.php (#8193)
* Housekeeping lib_rss.php
`lib_rss.php` had become much too large, especially after https://github.com/FreshRSS/FreshRSS/pull/7924
Moved most functions to other places.
Mostly no change of code otherwise (see comments).
* Extension: composer run-script phpstan-third-party
Diffstat (limited to 'cli')
| -rwxr-xr-x | cli/create-user.php | 2 | ||||
| -rwxr-xr-x | cli/db-backup.php | 2 | ||||
| -rwxr-xr-x | cli/db-restore.php | 2 | ||||
| -rwxr-xr-x | cli/list-users.php | 2 | ||||
| -rwxr-xr-x | cli/user-info.php | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/cli/create-user.php b/cli/create-user.php index 4de0ced1d..073a40b15 100755 --- a/cli/create-user.php +++ b/cli/create-user.php @@ -58,7 +58,7 @@ if (!empty($cliOptions->errors)) { $username = $cliOptions->user; -if (!empty(preg_grep("/^$username$/i", listUsers()))) { +if (!empty(preg_grep("/^$username$/i", FreshRSS_user_Controller::listUsers()))) { fail('FreshRSS warning: username already exists “' . $username . '”', EXIT_CODE_ALREADY_EXISTS); } diff --git a/cli/db-backup.php b/cli/db-backup.php index f391c6b41..959a7872d 100755 --- a/cli/db-backup.php +++ b/cli/db-backup.php @@ -19,7 +19,7 @@ if (!empty($cliOptions->errors)) { fail('FreshRSS error: ' . array_shift($cliOptions->errors) . "\n" . $cliOptions->usage); } -foreach (listUsers() as $username) { +foreach (FreshRSS_user_Controller::listUsers() as $username) { $username = cliInitUser($username); $filename = DATA_PATH . '/users/' . $username . '/backup.sqlite'; @unlink($filename); diff --git a/cli/db-restore.php b/cli/db-restore.php index 0de624519..dc4550b08 100755 --- a/cli/db-restore.php +++ b/cli/db-restore.php @@ -37,7 +37,7 @@ if (!$ok) { fail('FreshRSS database error: ' . (is_string($_SESSION['bd_error'] ?? null) ? $_SESSION['bd_error'] : 'Unknown error')); } -foreach (listUsers() as $username) { +foreach (FreshRSS_user_Controller::listUsers() as $username) { $username = cliInitUser($username); $filename = DATA_PATH . "/users/{$username}/backup.sqlite"; if (!file_exists($filename)) { diff --git a/cli/list-users.php b/cli/list-users.php index b4c185e03..46a3f2a7c 100755 --- a/cli/list-users.php +++ b/cli/list-users.php @@ -3,7 +3,7 @@ declare(strict_types=1); require __DIR__ . '/_cli.php'; -$users = listUsers(); +$users = FreshRSS_user_Controller::listUsers(); sort($users); if (FreshRSS_Context::systemConf()->default_user !== '' && in_array(FreshRSS_Context::systemConf()->default_user, $users, true)) { diff --git a/cli/user-info.php b/cli/user-info.php index dca3caefd..2771605ac 100755 --- a/cli/user-info.php +++ b/cli/user-info.php @@ -25,7 +25,7 @@ if (!empty($cliOptions->errors)) { fail('FreshRSS error: ' . array_shift($cliOptions->errors) . "\n" . $cliOptions->usage); } -$users = $cliOptions->user ?? listUsers(); +$users = $cliOptions->user ?? FreshRSS_user_Controller::listUsers(); sort($users); |
