aboutsummaryrefslogtreecommitdiff
path: root/cli/user-info.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-03-04 11:55:47 +0100
committerGravatar GitHub <noreply@github.com> 2017-03-04 11:55:47 +0100
commit6bbe89e9bc5ae5adf3d163923faa03c9207bd9e2 (patch)
treef14e842fbc320d3f3c1331dae62eb7e24aaf2517 /cli/user-info.php
parent29b4fbcf0abff1cff13b53d6b01e79e14de4c7f9 (diff)
parent2818c72f5ae00276a083d0c24454394e9d064c7c (diff)
Merge pull request #1447 from Alkarex/CLI-bugs
Fix CLI bugs
Diffstat (limited to 'cli/user-info.php')
-rwxr-xr-xcli/user-info.php16
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";
}
}