diff options
| author | 2017-03-03 23:01:33 +0100 | |
|---|---|---|
| committer | 2017-03-03 23:01:33 +0100 | |
| commit | ada94465e62d5809303afffc636fdae87aff2738 (patch) | |
| tree | f722a8116d21f3bdbdd969bcd9a8dae61536fd4c /cli/user-info.php | |
| parent | c544f510d26377684aefe8a27b484ee22bbd4f69 (diff) | |
CLI: More infos in user-info
https://github.com/FreshRSS/FreshRSS/issues/1449#issuecomment-283927614
Diffstat (limited to 'cli/user-info.php')
| -rwxr-xr-x | cli/user-info.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/cli/user-info.php b/cli/user-info.php index dd38e6c7f..aa3e239b8 100755 --- a/cli/user-info.php +++ b/cli/user-info.php @@ -14,22 +14,36 @@ $users = $options['user'] === '*' ? listUsers() : array($options['user']); foreach ($users as $username) { $username = cliInitUser($username); + echo $username === FreshRSS_Context::$system_conf->default_user ? '*' : ' ', "\t"; + $catDAO = new FreshRSS_CategoryDAO(); + $feedDAO = FreshRSS_Factory::createFeedDao($username); $entryDAO = FreshRSS_Factory::createEntryDao($username); - echo $username === FreshRSS_Context::$system_conf->default_user ? '*' : ' ', "\t"; + $nbEntries = $entryDAO->countUnreadRead(); + $nbFavorites = $entryDAO->countUnreadReadFavorites(); if (isset($options['h'])) { //Human format echo $username, "\t", date('c', FreshRSS_UserDAO::mtime($username)), "\t", format_bytes($entryDAO->size()), "\t", + $catDAO->count(), " categories\t", + count($feedDAO->listFeedsIds()), " feeds\t", + $nbEntries['read'], " reads\t", + $nbEntries['unread'], " unreads\t", + $nbFavorites['all'], " favourites\t", "\n"; } else { echo $username, "\t", FreshRSS_UserDAO::mtime($username), "\t", $entryDAO->size(), "\t", + $catDAO->count(), "\t", + count($feedDAO->listFeedsIds()), "\t", + $nbEntries['read'], "\t", + $nbEntries['unread'], "\t", + $nbFavorites['all'], "\t", "\n"; } } |
