display size of stored articles in the user details window

This commit is contained in:
Andrew Dolgov 2008-10-08 05:14:20 +01:00
parent f46192bb19
commit fad8506f65

View file

@ -53,7 +53,16 @@
// print "<tr><td>Access level</td><td>$access_level</td></tr>";
print "<tr><td>".__('Registered')."</td><td>$created</td></tr>";
print "<tr><td>".__('Last logged in')."</td><td>$last_login</td></tr>";
print "<tr><td>".__('Stored articles')."</td><td>$stored_articles</td></tr>";
$result = db_query($link, "SELECT
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 "<tr><td>".__('Stored articles').
"</td><td>$stored_articles (${db_size}K)</td></tr>";
$result = db_query($link, "SELECT COUNT(id) as num_feeds FROM ttrss_feeds
WHERE owner_uid = '$uid'");
@ -62,17 +71,6 @@
print "<tr><td>".__('Subscribed feeds count')."</td><td>$num_feeds</td></tr>";
/*
$result = db_query($link, "SELECT
SUM(LENGTH(content)+LENGTH(title)+LENGTH(link)+LENGTH(guid)) 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 "<tr><td>Approx. used DB size</td><td>$db_size KBytes</td></tr>";
*/
print "</table>";
print "<h1>".__('Subscribed feeds')."</h1>";