From 51b6d9b3801c7f4c3a668ffcc83a86f32f429a83 Mon Sep 17 00:00:00 2001 From: quix0r Date: Thu, 10 Jan 2013 06:37:52 +0000 Subject: [PATCH] Init variables on top --- inc/modules/guest/what-sponsor_infos.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/modules/guest/what-sponsor_infos.php b/inc/modules/guest/what-sponsor_infos.php index 5adb08c67f..77d4b26997 100644 --- a/inc/modules/guest/what-sponsor_infos.php +++ b/inc/modules/guest/what-sponsor_infos.php @@ -52,6 +52,10 @@ if ((!isExtensionActive('sponsor'))) { $result_act = FALSE; $result_pay = FALSE; +// ... and output variables +$OUT_ACT = ''; +$OUT_PAY = ''; + // Load all sponsor actions $result_act = SQL_QUERY("SELECT `m`.`title` AS `conv_title`, @@ -75,7 +79,6 @@ ORDER BY if (!SQL_HASZERONUMS($result_act)) { // Load all actions - $OUT_ACT = ''; while ($content = SQL_FETCHARRAY($result_act)) { // Load row template and switch color $OUT_ACT .= loadTemplate('guest_sponsor_act_row', TRUE, $content); @@ -85,14 +88,13 @@ if (!SQL_HASZERONUMS($result_act)) { $result_pay = SQL_QUERY('SELECT `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` ORDER BY `pay_name` ASC', __FILE__, __LINE__); if (!SQL_HASZERONUMS($result_pay)) { // Load all pay types - $OUT_PAY = ''; while ($content = SQL_FETCHARRAY($result_pay)) { // Load row template and switch color $OUT_PAY .= loadTemplate('guest_sponsor_pay_row', TRUE, $content); } // END - while } else { // No pay types setuped so far! - $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', FALSE, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', TRUE)); + $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', TRUE, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', TRUE)); } } else { // No actions activated so far! -- 2.39.5