From: <car...@us...> - 2025-02-18 06:52:59
|
Revision: 11127 http://sourceforge.net/p/phpwiki/code/11127 Author: carstenklapp Date: 2025-02-18 06:52:56 +0000 (Tue, 18 Feb 2025) Log Message: ----------- reformat debug memory report in mb etc instead of bytes Modified Paths: -------------- trunk/themes/default/templates/debug.tmpl Modified: trunk/themes/default/templates/debug.tmpl =================================================================== --- trunk/themes/default/templates/debug.tmpl 2025-02-18 04:46:41 UTC (rev 11126) +++ trunk/themes/default/templates/debug.tmpl 2025-02-18 06:52:56 UTC (rev 11127) @@ -11,9 +11,11 @@ alt="Valid CSS 3!" /></a> </div> </td><td> -<span class="debug"><?php echo fmt("Page Execution took %s seconds", $RUNTIMER->getStats())?> +<span class="debug"><?php echo fmt(_("Page Execution took %s seconds"), $RUNTIMER->getStats())?> <?php $mem = @memory_get_usage(); if ($mem) { ?> - <?php echo fmt(", Memory: %s", $mem) ?> +<?php + $formatted = round($mem/pow(1024,($i=floor(log($mem,1024)))),2).' '.array('b','kb','mb','gb','tb','pb')[$i]; + echo fmt(_(", Memory: %s"), $formatted) ?> <?php } ?> </span> </td></tr></table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |