]> git.wh0rd.org Git - tt-rss.git/commitdiff
approx db size in user details shows kbytes
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 18 Nov 2005 13:29:32 +0000 (14:29 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 18 Nov 2005 13:29:32 +0000 (14:29 +0100)
backend.php

index 2f1e7c2f8fc09cf6f9fea84d05d641a948a80934..36d1a66eea1f631bae7f66227cb4c1557d33fe22 100644 (file)
                        SUM(LENGTH(content)+LENGTH(title)+LENGTH(link)+LENGTH(guid)) AS db_size 
                        FROM ttrss_entries WHERE owner_uid = '$uid'");
 
-               $db_size = db_fetch_result($result, 0, "db_size");
+               $db_size = round(db_fetch_result($result, 0, "db_size") / 1024);
 
-               print "<tr><td>Approx. DB size</td><td>$db_size bytes</td></tr>";
+               print "<tr><td>Approx. DB size</td><td>$db_size KBytes</td></tr>";
 
                print "</table>";
 
                print "<h1>Subscribed feeds</h1>";
 
                $result = db_query($link, "SELECT id,title,feed_url FROM ttrss_feeds
-                       WHERE owner_uid = '$uid'");
+                       WHERE owner_uid = '$uid' ORDER BY title");
 
                print "<ul class=\"nomarks\">";