]> git.wh0rd.org Git - tt-rss.git/commitdiff
display size of stored articles in the user details window
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 8 Oct 2008 04:14:20 +0000 (05:14 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 8 Oct 2008 04:14:20 +0000 (05:14 +0100)
modules/pref-users.php

index 0619270335ee1f09d221b30a01e8a64320d23db9..75afb00a386f9d6aefa8faec0f14abc19f667a5b 100644 (file)
                        // 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 COUNT(id) as num_feeds FROM ttrss_feeds
-                               WHERE owner_uid = '$uid'");
-
-                       $num_feeds = db_fetch_result($result, 0, "num_feeds");
-
-                       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 
+                               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>Approx. used DB size</td><td>$db_size KBytes</td></tr>";
-                       */
+                       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'");
+
+                       $num_feeds = db_fetch_result($result, 0, "num_feeds");
+
+                       print "<tr><td>".__('Subscribed feeds count')."</td><td>$num_feeds</td></tr>";
+       
                        print "</table>";
 
                        print "<h1>".__('Subscribed feeds')."</h1>";