From 78ea4fb68499daac3c709245842bfd9402a248be Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 16 Aug 2010 04:55:23 +0000 Subject: [PATCH] Some strtoupper() calls saved --- inc/fix_filters.php | 2 +- inc/modules/admin/admin-inc.php | 8 ++++---- inc/modules/admin/what-list_doubler.php | 6 ++++-- inc/template-functions.php | 4 +++- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/inc/fix_filters.php b/inc/fix_filters.php index f18079a787..cc3e0cc4d3 100644 --- a/inc/fix_filters.php +++ b/inc/fix_filters.php @@ -55,7 +55,7 @@ if (!SQL_HASZERONUMS($result)) { // Load row by row while ($filter = SQL_FETCHARRAY($result)) { // Now search again for this filter and get it's total count - $count = countSumTotalData($filter['filter_name'], 'filters', 'filter_id', 'filter_name', true, sprintf(" AND `filter_function`='%s'", $filter['filter_function'])); + $count = countSumTotalData($filter['filter_name'], 'filters', 'filter_id', 'filter_name', true, sprintf(" AND `filter_function`='%s'", SQL_ESCAPE($filter['filter_function']))); // Do we have more than one entry? if ($count > 1) { diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index f7e868bc11..23f3ddcf5b 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -747,17 +747,17 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '', $ } // Send email out - sendEmail(postRequestParameter($userid, $id), '{--MEMBER_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}', $mail); + sendEmail(postRequestParameter($userid, $id), strtoupper('{--MEMBER_' . $subject . '_' . $table . '_SUBJECT--}'), $mail); } // END - if // Generate subject - $subject = '{--ADMIN_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}'; + $subject = strtoupper('{--ADMIN_' $subject . '_' . $table . '_SUBJECT--}'); // Send admin notification out if (!empty($subjectPart)) { - sendAdminNotification('{--ADMIN_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}', 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestParameter($userid, $id)); + sendAdminNotification($subject, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestParameter($userid, $id)); } else { - sendAdminNotification('{--ADMIN_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}', 'admin_' . $mode . '_' . $table, $content, postRequestParameter($userid, $id)); + sendAdminNotification($subject, 'admin_' . $mode . '_' . $table, $content, postRequestParameter($userid, $id)); } } diff --git a/inc/modules/admin/what-list_doubler.php b/inc/modules/admin/what-list_doubler.php index 0bf30c0e8e..916b15979d 100644 --- a/inc/modules/admin/what-list_doubler.php +++ b/inc/modules/admin/what-list_doubler.php @@ -50,10 +50,12 @@ if (!isGetRequestParameterSet('mode')) { setGetRequestParameter('mode', 'overview'); } else { // Set table title automatically - if (!isGetRequestParameterSet('select')) setGetRequestParameter('select', 'all'); + if (!isGetRequestParameterSet('select')) { + setGetRequestParameter('select', 'all'); + } // END - if // Prepare header - $content['list_' . strtolower(getRequestParameter('mode'))] = '{--ADMIN_DOUBLER_LIST_' . strtoupper(getRequestParameter('mode')) . '_' . strtoupper(getRequestParameter('select')) . '--}'; + $content['list_' . strtolower(getRequestParameter('mode'))] = strtoupper('{--ADMIN_DOUBLER_LIST_' . getRequestParameter('mode') . '_' . getRequestParameter('select') . '--}'); } // Load data for the template diff --git a/inc/template-functions.php b/inc/template-functions.php index 65e73d005a..d96bfb7395 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -1130,7 +1130,9 @@ function displayParsingTime () { $start = explode(' ', $GLOBALS['startTime']); $end = explode(' ', $endTime); $runTime = $end[0] - $start[0]; - if ($runTime < 0) $runTime = '0'; + if ($runTime < 0) { + $runTime = '0'; + } // END - if // Prepare output // @TODO This can be easily moved out after the merge from EL branch to this is complete -- 2.39.5