X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-cache_stats.php;h=ee2f431796d17bb0712488357a9339f915b6e650;hp=121f202bde3994841e51be127b205805cb66bf1f;hb=9d81813f782e6e9edf693eabcc73e5ce4660aee6;hpb=04036a4a4742c06629a5acba7c6c6ad2b5a03c5a diff --git a/inc/modules/admin/what-cache_stats.php b/inc/modules/admin/what-cache_stats.php index 121f202bde..ee2f431796 100644 --- a/inc/modules/admin/what-cache_stats.php +++ b/inc/modules/admin/what-cache_stats.php @@ -40,12 +40,14 @@ if ((!defined('__SECURITY')) || (!is_admin())) { // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); +// Calculate total hits +$totalHits = ($_CONFIG['db_hits'] + $_CONFIG['cache_hits']); + // Prepare data for the template -define('__DB_HITS' , $_CONFIG['db_hits']); -$HITS = str_repeat(" ", abs(strlen($_CONFIG['db_hits']) - strlen($_CONFIG['cache_hits']))).$_CONFIG['cache_hits']; -define('__CACHE_HITS', $HITS); -define('__TOTAL_HITS', ($_CONFIG['db_hits'] + $_CONFIG['cache_hits'])); -define('__CACHE_PERC', TRANSLATE_COMMA(($_CONFIG['cache_hits'] / __TOTAL_HITS * 100))); +define('__DB_HITS' , TRANSLATE_COMMA($_CONFIG['db_hits'])); +define('__CACHE_HITS', TRANSLATE_COMMA($_CONFIG['cache_hits'])); +define('__TOTAL_HITS', TRANSLATE_COMMA($totalHits)); +define('__CACHE_PERC', TRANSLATE_COMMA(($_CONFIG['cache_hits'] / $totalHits * 100))); // Load template LOAD_TEMPLATE("admin_cache_stats");