diff options
| author | 2021-01-02 21:20:19 +0100 | |
|---|---|---|
| committer | 2021-01-02 21:20:19 +0100 | |
| commit | 9c6682e7edf8cbad828088cbeeef66c7ecefdd9a (patch) | |
| tree | c8c8a6ba34d49d22497a14ddaf18ae97d8cd5bb1 /cli/user-info.php | |
| parent | 7bc2cc5825547f5b5cf15005fda937e06065b45d (diff) | |
Avoid manual initialisations of system or user configuration (#3070)
* Avoid manual intialisations of system or user configuration
More consistent use of Context
* Simplify FreshRSS_Context::initUser
* Remove a few manual get_user_configuration
* A bit of debugging
* Fix context user init
* Fix install
* Fix concurrency
Concurrent requests could lead to bad race condition
* Fix actualize cron
Fix case when system i initialised several times
Diffstat (limited to 'cli/user-info.php')
| -rwxr-xr-x | cli/user-info.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cli/user-info.php b/cli/user-info.php index 95381ce33..582d10431 100755 --- a/cli/user-info.php +++ b/cli/user-info.php @@ -55,7 +55,6 @@ if (array_key_exists('header', $options)) { foreach ($users as $username) { $username = cliInitUser($username); - $userConfiguration = get_user_configuration($username); $catDAO = FreshRSS_Factory::createCategoryDao($username); $feedDAO = FreshRSS_Factory::createFeedDao($username); $entryDAO = FreshRSS_Factory::createEntryDao($username); @@ -68,8 +67,8 @@ foreach ($users as $username) { $data = array( 'default' => $username === FreshRSS_Context::$system_conf->default_user ? '*' : '', 'user' => $username, - 'admin' => $userConfiguration->is_admin ? '*' : '', - 'enabled' => $userConfiguration->enabled ? '*' : '', + 'admin' => FreshRSS_Context::$user_conf->is_admin ? '*' : '', + 'enabled' => FreshRSS_Context::$user_conf->enabled ? '*' : '', 'last_user_activity' => FreshRSS_UserDAO::mtime($username), 'database_size' => $databaseDAO->size(), 'categories' => (int) $catDAO->count(), @@ -78,8 +77,8 @@ foreach ($users as $username) { 'unreads' => (int) $nbEntries['unread'], 'favourites' => (int) $nbFavorites['all'], 'tags' => (int) $tagDAO->count(), - 'lang' => $userConfiguration->language, - 'mail_login' => $userConfiguration->mail_login, + 'lang' => FreshRSS_Context::$user_conf->language, + 'mail_login' => FreshRSS_Context::$user_conf->mail_login, ); if (isset($options['h'])) { //Human format $data['last_user_activity'] = date('c', $data['last_user_activity']); |
