From 65790be5f10a8879de2168737e23d896a3ee8ed8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 22 Dec 2012 22:38:26 +0000 Subject: [PATCH] Minor improvements, wrote all upper-case --- inc/modules/guest/what-stats.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index b341e0ecd4..9ee6c44086 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -55,20 +55,20 @@ $do = getConfig('guest_stats'); // Determine which stats are wanted and set mode and title for the link below stats block if (isGetRequestElementSet('do')) { // Use it from get value - $do = getRequestElement('do'); + $do = strtoupper(getRequestElement('do')); } // END - if switch ($do) { - case 'members' : - $lmode = 'modules'; + case 'MEMBERS' : + $lmode = 'MODULES'; break; - case 'modules' : - $lmode = 'members'; + case 'MODULES' : + $lmode = 'MEMBERS'; break; - case 'inactive': - $lmode = 'inactive'; + case 'INACTIVE': + $lmode = 'INACTIVE'; break; default: @@ -78,7 +78,7 @@ switch ($do) { } // END - switch // Set link title -$ltitle = '{--GUEST_STATS_' . strtoupper($lmode) . '--}'; +$ltitle = '{--GUEST_STATS_' . $lmode . '--}'; // @TODO This can be rewritten in a dynamic include switch (strtoupper($do)) { @@ -208,7 +208,8 @@ switch (strtoupper($do)) { } // END - while } // END - if - if ((!SQL_HASZERONUMS($guest_t10)) || (!SQL_HASZERONUMS($mem_t10))) { + // Is something generated? + if (!empty($OUT)) { // Prepare content $content = array( 'rows' => $OUT, -- 2.39.5