From fad8506f6511c83be66442aa6231b0455281a9d1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 8 Oct 2008 05:14:20 +0100 Subject: [PATCH] display size of stored articles in the user details window --- modules/pref-users.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/modules/pref-users.php b/modules/pref-users.php index 06192703..75afb00a 100644 --- a/modules/pref-users.php +++ b/modules/pref-users.php @@ -53,26 +53,24 @@ // print "Access level$access_level"; print "".__('Registered')."$created"; print "".__('Last logged in')."$last_login"; - print "".__('Stored articles')."$stored_articles"; - $result = db_query($link, "SELECT COUNT(id) as num_feeds FROM ttrss_feeds - WHERE owner_uid = '$uid'"); - - $num_feeds = db_fetch_result($result, 0, "num_feeds"); - - print "".__('Subscribed feeds count')."$num_feeds"; - - /* $result = db_query($link, "SELECT - SUM(LENGTH(content)+LENGTH(title)+LENGTH(link)+LENGTH(guid)) AS db_size + SUM(LENGTH(content)) AS db_size FROM ttrss_user_entries,ttrss_entries WHERE owner_uid = '$uid' AND ref_id = id"); $db_size = round(db_fetch_result($result, 0, "db_size") / 1024); - print "Approx. used DB size$db_size KBytes"; - */ + print "".__('Stored articles'). + "$stored_articles (${db_size}K)"; + $result = db_query($link, "SELECT COUNT(id) as num_feeds FROM ttrss_feeds + WHERE owner_uid = '$uid'"); + + $num_feeds = db_fetch_result($result, 0, "num_feeds"); + + print "".__('Subscribed feeds count')."$num_feeds"; + print ""; print "

".__('Subscribed feeds')."

"; -- 2.39.5