[mirrorbrain-commits] r7996 - /trunk/mod_mirrorbrain/mod_mirrorbrain.c

From: <poeml_at_mirrorbrain.org>
Date: Sat, 13 Mar 2010 01:05:13 -0000
Author: poeml
Date: Sat Mar 13 02:05:12 2010
New Revision: 7996

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=7996&view=rev
Log:
mod_mirrorbrain:
- File size in mirror lists is now also displayed in more human readable form.

Modified:
    trunk/mod_mirrorbrain/mod_mirrorbrain.c

Modified: trunk/mod_mirrorbrain/mod_mirrorbrain.c
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mod_mirrorbrain/mod_mirrorbrain.c?rev=7996&r1=7995&r2=7996&view=diff
==============================================================================
--- trunk/mod_mirrorbrain/mod_mirrorbrain.c (original)
+++ trunk/mod_mirrorbrain/mod_mirrorbrain.c Sat Mar 13 02:05:12 2010
_at_@ -2254,7 +2254,10 @@
 
         /* Metadata */
         ap_rputs("  <ul>\n", r);
-        ap_rprintf(r, "  <li>Size: %s bytes</li>\n", apr_off_t_toa(r->pool, r->finfo.size));
+        char buf[5];
+        ap_rprintf(r, "  <li>Size: %s (%s bytes)</li>\n", 
+                   apr_strfsize(r->finfo.size, buf),
+                   apr_off_t_toa(r->pool, r->finfo.size));
         time_str = apr_palloc(r->pool, APR_RFC822_DATE_LEN);
         apr_rfc822_date(time_str, r->finfo.mtime);
         ap_rprintf(r, "  <li>Last modified: %s (Unix time: %lld)</li>\n", time_str, r->finfo.mtime / 1000000);
_at_@ -2294,7 +2297,7 @@
                    "  <br/>\n", 
                 r->hostname, r->uri, r->hostname, r->uri);
         if (magnet) {
-            ap_rprintf(r, "  <a href=\"%s\">Magnet Link</a>\n", magnet);
+            ap_rprintf(r, "  <a href=\"%s\">Magnet Link</a> for P2P software</a>\n", magnet);
         }
         ap_rputs("  </blockquote>", r);
 




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Sat Mar 13 2010 - 01:05:14 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT