From: Roland Häder Date: Thu, 10 Jan 2013 06:37:52 +0000 (+0000) Subject: Init variables on top X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bf573839266f09261cbfc2f6a7759f463080900e;p=mailer.git Init variables on top --- 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!