Our convention says if(-else) blocks should not be put in one line
authorRoland Häder <roland@mxchange.org>
Wed, 21 Jul 2010 00:55:07 +0000 (00:55 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 21 Jul 2010 00:55:07 +0000 (00:55 +0000)
12 files changed:
DOCS/TODOs.txt
inc/extensions/ext-beg.php
inc/functions.php
inc/libs/rallye_functions.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-list_rallyes.php
inc/modules/admin/what-lock_user.php
inc/modules/admin/what-optimize.php
inc/modules/admin/what-repair_amnu.php
inc/modules/admin/what-repair_gmnu.php
inc/modules/admin/what-repair_mmnu.php
inc/mysql-manager.php

index fd4a6008d45860fe8fdc870b04abf2a6ecc1a64e..1afabe3353dc7702235a1d93c0fa689803b445c0 100644 (file)
@@ -46,7 +46,7 @@
 ./inc/functions.php:1577:                      // @TODO Are these convertions still required?
 ./inc/functions.php:1595:// @TODO Rewrite this function to use readFromFile() and writeToFile()
 ./inc/functions.php:178:// @TODO Rewrite this to an extension 'smtp'
-./inc/functions.php:2248:      // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:2251:      // @TODO This is still very static, rewrite it somehow
 ./inc/gen_sql_patches.php:96:// @TODO Rewrite this to a filter
 ./inc/install-functions.php:63:        // @TODO DEACTIVATED: changeDataInFile(getCachePath() . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
 ./inc/language/de.php:1127:// @TODO Rewrite these two constants
 ./inc/libs/doubler_functions.php:46:// @TODO Lame description
 ./inc/libs/doubler_functions.php:94:                   // @TODO Can't this be moved into EL?
 ./inc/libs/mailid_functions.php:49:            // @TODO Rewrite this to a dynamic include or so
-./inc/libs/rallye_functions.php:700:// @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId()
-./inc/libs/rallye_functions.php:765:   $EXPIRE = 3; // @TODO The hard-coded value...
-./inc/libs/rallye_functions.php:851:// @TODO Please document this function
-./inc/libs/rallye_functions.php:907:           // Load count @TODO Can't we rewrite this to our API?
+./inc/libs/rallye_functions.php:704:// @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId()
+./inc/libs/rallye_functions.php:769:   $EXPIRE = 3; // @TODO The hard-coded value...
+./inc/libs/rallye_functions.php:855:// @TODO Please document this function
+./inc/libs/rallye_functions.php:911:           // Load count @TODO Can't we rewrite this to our API?
 ./inc/libs/refback_functions.php:61:           // @TODO Try to rewrite the following unset()
 ./inc/libs/register_functions.php:292: // @TODO Rewrite these all to a single filter
 ./inc/libs/register_functions.php:365: // @TODO Rewrite this to a filter
 ./inc/modules/admin/what-del_email.php:61:             // @TODO Unused: cat_id, payment_id
 ./inc/modules/admin/what-edit_user.php:20: * @TODO Add support for ext-country                                    *
 ./inc/modules/admin/what-email_stats.php:48:// @TODO Unused at the moment
-./inc/modules/admin/what-extensions.php:359:                                           // @TODO Rewrite this to a filter
+./inc/modules/admin/what-extensions.php:364:                                           // @TODO Rewrite this to a filter
 ./inc/modules/admin/what-guest_add.php:131:                            // @TODO This can be somehow rewritten to a function
 ./inc/modules/admin/what-guest_add.php:69:             // @TODO Cant this be rewritten?
 ./inc/modules/admin/what-guest_add.php:82:             // @TODO This can be somehow rewritten to a function
 ./inc/modules/member/what-unconfirmed.php:143: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
 ./inc/modules/order.php:76:            // @TODO Unused: 2,4
 ./inc/monthly/monthly_bonus.php:69:    // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1168:  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1415:                  // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
-./inc/mysql-manager.php:1513:  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1880:                  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1924:// @TODO Fix inconsistency between last_module and getWhat()
+./inc/mysql-manager.php:1171:  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:1418:                  // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
+./inc/mysql-manager.php:1516:  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:1883:                  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:1927:// @TODO Fix inconsistency between last_module and getWhat()
 ./inc/mysql-manager.php:370:   // @TODO Try to rewrite this to one or more functions
 ./inc/mysql-manager.php:46:// @TODO Can we cache this?
 ./inc/reset/reset_beg.php:51:// @TODO This should be converted in a daily beg rallye
index 605a83ba1dcd72135701cb41878c3fee10d0f3c5..d5f5e03171e0a3b93aed90d7bf643eee80100dc1 100644 (file)
@@ -157,10 +157,13 @@ PRIMARY KEY (`id`)
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_rallye` ENUM('Y','N') NOT NULL DEFAULT 'N'");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `beg_points` FLOAT(21,5) UNSIGNED NOT NULL DEFAULT 0.00000");
 
-                               $VIS = 'N'; $LOCKED = 'Y';
-                               if (isExtensionActive('beg')) { $VIS = 'Y'; $LOCKED = 'N'; }
+                               $visible = 'N'; $locked = 'Y';
+                               if (isExtensionActive('beg')) {
+                                       $visible = 'Y';
+                                       $locked = 'N';
+                               } // END - if
 
-                               addMemberMenuSql('main','beg2','Bettel-Rallye',$VIS,$LOCKED,7);
+                               addMemberMenuSql('main','beg2','Bettel-Rallye', $visible, $locked, 7);
                                addAdminMenuSql('user','list_beg','Bettel-Rallye','Listet alle Teilnehmer der monatlichen Bettel-Rallye auf.','12');
 
                                // Update notes (these will be set as task text!)
index 944d0281ee1c328c72142c28e21758554711eb7c..740dccbd1b16e3fce38a15ff94224465a0662e8f 100644 (file)
@@ -1623,7 +1623,10 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) {
                                        // Read from source file
                                        $line = fgets ($fp, 1024);
 
-                                       if (strpos($line, $search) > -1) { $next = '0'; $found = true; }
+                                       if (strpos($line, $search) > -1) { 
+                                               $next = '0';
+                                               $found = true;
+                                       } // END - if
 
                                        if ($next > -1) {
                                                if ($next === $seek) {
index c9a781a360194553c28ea66dbbe5cab471ae2163..ca7e60fb54485d1b44931d4c2fcb8de472c457bd 100644 (file)
@@ -293,7 +293,11 @@ LIMIT 1",
 
                // List only users with at least one ref!
                //* DEBUG: */ debugOutput('*'.$cnt.'/'.$content['userid'].'/'.$content['curr_points'].'/'.$refpoints.'*');
-               if (($cnt > 0) && ($refpoints > $content['curr_points'])) { $userid = $content['userid']; } else { $cnt = ''; }
+               if (($cnt > 0) && ($refpoints > $content['curr_points'])) {
+                       $userid = $content['userid'];
+               } else {
+                       $cnt = '';
+               }
 
                // Save values to array
                $DATA['userid'][]   = $userid;
index 9df38198aba19058e89800318697653ba9342cc3..b3cc40546d28d3bd1f15a9472b7b37eda6fdeeb1 100644 (file)
@@ -63,10 +63,15 @@ if (isGetRequestParameterSet('reg_ext')) {
                        loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_ALWAYS_ACTIVE', getExtensionName($taskId)));
                } else {
                        // De/activate extension
-                       $ACT = 'N'; setExtensionMode('deactivate');
-                       if ($active != 'Y') { $ACT = 'Y'; setExtensionMode('activate'); }
+                       $active = 'N'; setExtensionMode('deactivate');
+                       if ($active != 'Y') {
+                               $active = 'Y';
+                               setExtensionMode('activate');
+                       } // END - if
+
+                       // Update database
                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='%s' WHERE `id`=%s AND `ext_active`='%s' LIMIT 1",
-                               array($ACT, bigintval($taskId), $active), __FILE__, __LINE__);
+                               array($active, bigintval($taskId), $active), __FILE__, __LINE__);
 
                        // Run embeded SQL commands
                        doExtensionSqls($taskId, getExtensionMode());
index d60526728a1f876057018d2a4456245f9f56e319..c4344ab7fe1cf49bfc8fdf45379bb847021822b6 100644 (file)
@@ -251,7 +251,10 @@ ORDER BY
                        $br = '';
 
                        // Output row
-                       if (($row['curr_points'] > 0) && ($cnt > 0)) { $bl = '<strong>'; $br = '</strong>'; }
+                       if (($row['curr_points'] > 0) && ($cnt > 0)) {
+                               $bl = '<strong>';
+                               $br = '</strong>';
+                       } // END - if
 
                        // Get user points
                        $points = countSumTotalData($row['userid'], 'user_points', 'points', 'userid', false, " AND `ref_depth`=1 LIMIT 1");
index fbc3d8bfffe6d0729a5cc4712212a9241efb4c8a..2bf2bbee0d7ff7cebc1c7aac46ea47071a38cc04 100644 (file)
@@ -48,7 +48,7 @@ addMenuDescription('admin', __FILE__);
 // Is a userid set?
 if (isGetRequestParameterSet('userid')) {
        // Action not performed by default
-       $ACT = false;
+       $isActive = false;
 
        // Load user's data
        if (fetchUserData(getRequestParameter('userid'))) {
@@ -76,7 +76,7 @@ if (isGetRequestParameterSet('userid')) {
 
                        // Prepare message
                        $message = getMaskedMessage('USER_ACCOUNT_LOCKED', bigintval(getRequestParameter('userid')));
-                       $ACT = true;
+                       $isActive = true;
                } elseif ((isPostRequestParameterSet('unlock')) && (getUserData('status') == 'LOCKED')) {
                        // Ok, unlock the account!
                        if (isExtensionInstalledAndNewer('user', '0.3.5')) {
@@ -111,10 +111,10 @@ LIMIT 1",
 
                        // Prepare message
                        $message = getMaskedMessage('USER_ACCOUNT_UNLOCKED', bigintval(getRequestParameter('userid')));
-                       $ACT = true;
+                       $isActive = true;
                } elseif (isFormSent('del')) {
                        // Delete the account
-                       $ACT = true;
+                       $isActive = true;
                        loadIncludeOnce('inc/modules/admin/what-del_user.php');
                } elseif (isPostRequestParameterSet('no')) {
                        // Do not lock him...
@@ -158,7 +158,7 @@ LIMIT 1",
                if (!empty($url)) {
                        // Reload and die...
                        redirectToUrl($url);
-               } elseif ($ACT) {
+               } elseif ($isActive) {
                        // An action was performed...
                        if (!empty($message)) {
                                loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . $message . '</div>');
index 68724755f3202aaada2765cd1899c5c1eb575e00..48f1cdfbe72e871281f23dee4ecf349f9add1144 100644 (file)
@@ -57,17 +57,16 @@ foreach ($DATA['tables'] as $row_array) {
        // Fixes a bug which causes a parser error on eval'd code
        if (empty($row_array[1])) $row_array[1] = 'NONE';
 
-       // Get optimization status
-       $REP = '{--OPTIMIZE_STATUS_' . str_replace('__', '_', str_replace(',', '', str_replace('+', '', str_replace("'", '', str_replace(' ', '_', strtoupper($row_array[1])))))) . '--}';
-
-       $OPT = '{--OPTIMIZE_STATUS_UNSUPPORTED--}';
+       // Get repair/optimization status
+       $repairStatus = '{--OPTIMIZE_STATUS_' . str_replace('__', '_', str_replace(',', '', str_replace('+', '', str_replace("'", '', str_replace(' ', '_', strtoupper($row_array[1])))))) . '--}';
+       $optimizeStatus = '{--OPTIMIZE_STATUS_UNSUPPORTED--}';
 
        if ($row_array[4] > 0) {
-               $OPT = '{--OPTIMIZE_STATUS_OPTIMIZED--}';
+               $optimizeStatus = '{--OPTIMIZE_STATUS_OPTIMIZED--}';
                $B1 = '<strong>'; $B2 = '<strong>';
                $gain_tabs++;
        } elseif (count(explode(' ', $row_array[2])) == 0) {
-               $OPT = '{--OPTIMIZE_STATUS_' . strtoupper($row_array[2]) . '--}';
+               $optimizeStatus = '{--OPTIMIZE_STATUS_' . strtoupper($row_array[2]) . '--}';
        }
 
        // Prepare data for the row template
@@ -75,8 +74,8 @@ foreach ($DATA['tables'] as $row_array) {
                'b1'  => $B1,
                'b2'  => $B2,
                'tpl' => $row_array[0],
-               'rep' => $REP,
-               'opt' => $OPT,
+               'rep' => $repairStatus,
+               'opt' => $optimizeStatus,
                'sum' => $row_array[3],
                'sav' => $row_array[4],
        );
@@ -85,12 +84,14 @@ foreach ($DATA['tables'] as $row_array) {
        $OUT .= loadTemplate('admin_optimize_row', true, $content);
 } // END - foreach
 
+// Transfer main data
+$content = $DATA;
+
 // Remember rows
 $content['rows'] = $OUT;
 
 // Transfer data to $content for template
-$content = merge_array($content, $DATA);
-$content['now_optimized']   = $gain_tabs;
+$content['now_optimized'] = $gain_tabs;
 
 // Load main template
 loadTemplate('admin_optimize', false, $content);
index c9fc15ea22a56df3547ee3b0a1eba3e72df37695..d0e58e66d49a2d5799c3cbbb653d2a1a1657521b 100644 (file)
@@ -45,46 +45,46 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
-$ACTIONS = array();
+$actions = array();
 
 // First fix all main menus (what = '')...
 $result_fix = SQL_QUERY("SELECT `id`, `action` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) AND `action` != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
-$cnt = '0'; $REP = '0';
+$cnt = '0'; $repairedWeights = '0';
 while ($content = SQL_FETCHARRAY($result_fix)) {
        // Store act value for later usage in sorting sub menus
-       $ACTIONS[] = $content['action'];
+       $actions[] = $content['action'];
 
        // Fix weight
        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
-       array($cnt, $content['id']), __FILE__, __LINE__);
-       $REP += SQL_AFFECTEDROWS();
+               array($cnt, $content['id']), __FILE__, __LINE__);
+       $repairedWeights += SQL_AFFECTEDROWS();
 
        // Count one up
        $cnt++;
-}
+} // END - while
 
 // Set logout weight to 999
 SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`='999' WHERE `action`='logout' AND (`what`='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
 
 // Now sort every each menu
-foreach ($ACTIONS as $action) {
+foreach ($actions as $action) {
        $result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
                array($action), __FILE__, __LINE__);
        $cnt = 1;
        while ($content = SQL_FETCHARRAY($result_fix)) {
                // Fix weight
                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`=%s WHERE `id`=%s LIMIT 1",
-               array($cnt, $content['id']), __FILE__, __LINE__);
-               $REP += SQL_AFFECTEDROWS();
+                       array($cnt, $content['id']), __FILE__, __LINE__);
+               $repairedWeights += SQL_AFFECTEDROWS();
 
                // Count one up
                $cnt++;
-       }
-}
+       } // END - while
+} // END - foreach
 
 // Repair finished
-if ($REP > 0) {
-       $message = getMaskedMessage('ADMIN_REPAIR_ENTRIES_FIXED', $REP);
+if ($repairedWeights > 0) {
+       $message = getMaskedMessage('ADMIN_REPAIR_ENTRIES_FIXED', $repairedWeights);
 } else {
        $message = '{--ADMIN_REPAIR_NOTHING_FIXED--}';
 }
index a817e85a83455d0ba66a1d8c09e088c54e8f860d..cff162ad9df99e1bac4ea321dc3b2584c7e793c4 100644 (file)
@@ -45,20 +45,21 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
-$ACTIONS = array();
+$actions = array();
+
 // First fix all main menus (what = '')...
 $result_fix = SQL_QUERY("SELECT `id`, `action` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND `action` != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
-$cnt = '0'; $REP = '0';
+$cnt = '0'; $repairedWeights = '0';
 while ($content = SQL_FETCHARRAY($result_fix)) {
        // Store act value for later usage in sorting sub menus
-       $ACTIONS[] = $content['action'];
+       $actions[] = $content['action'];
 
        // Fix weight
        $result_sort = SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `sort`='%s WHERE `id`=%s' LIMIT 1",
                array($cnt, $content['id']), __FILE__, __LINE__);
 
        // Get updated rows
-       $REP += SQL_AFFECTEDROWS();
+       $repairedWeights += SQL_AFFECTEDROWS();
 
        // Count one up
        $cnt++;
@@ -68,7 +69,7 @@ while ($content = SQL_FETCHARRAY($result_fix)) {
 $result_sort = SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET sort='999' WHERE `action`='logout' AND (`what`='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
 
 // Now sort every each menu
-foreach ($ACTIONS as $action) {
+foreach ($actions as $action) {
        $result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
                array($action), __FILE__, __LINE__);
        $cnt = 1;
@@ -76,16 +77,16 @@ foreach ($ACTIONS as $action) {
                // Fix weight
                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `sort`=%s WHERE `id`=%s LIMIT 1",
                array($cnt, $content['id']), __FILE__, __LINE__);
-               $REP += SQL_AFFECTEDROWS();
+               $repairedWeights += SQL_AFFECTEDROWS();
 
                // Count one up
                $cnt++;
-       }
-}
+       } // END - while
+} // END - foreach
 
 // Repair finished
-if ($REP > 0) {
-       $message = getMaskedMessage('ADMIN_REPAIR_ENTRIES_FIXED', $REP);
+if ($repairedWeights > 0) {
+       $message = getMaskedMessage('ADMIN_REPAIR_ENTRIES_FIXED', $repairedWeights);
 } else {
        $message = '{--ADMIN_REPAIR_NOTHING_FIXED--}';
 }
index 374e1cb8f8d7aa5a83221d4e5c324bd7e47b4d29..6fb110927228eedc21d3a9ed315797269667b438 100644 (file)
@@ -45,29 +45,29 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
-$ACTIONS = array();
+$actions = array();
 
 // First fix all main menus (what = '')...
 $result_fix = SQL_QUERY("SELECT `id`, `action` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) AND `action` != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
-$cnt = '0'; $REP = '0';
+$cnt = '0'; $repairedWeights = '0';
 while ($content = SQL_FETCHARRAY($result_fix)) {
        // Store action value for later usage in sorting sub menus
-       $ACTIONS[] = $content['action'];
+       $actions[] = $content['action'];
 
        // Fix weight
        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`=%s WHERE `id`=%s LIMIT 1",
        array($cnt, $content['id']), __FILE__, __LINE__);
-       $REP += SQL_AFFECTEDROWS();
+       $repairedWeights += SQL_AFFECTEDROWS();
 
        // Count one up
        $cnt++;
-}
+} // END - while
 
 // Set logout weight to 999
 SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET sort='999' WHERE `action`='logout' AND (`what`='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
 
 // Now sort every each menu
-foreach ($ACTIONS as $action) {
+foreach ($actions as $action) {
        $result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
                array($action), __FILE__, __LINE__);
        $cnt = 1;
@@ -75,16 +75,16 @@ foreach ($ACTIONS as $action) {
                // Fix weight
                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
                array($cnt, $content['id']), __FILE__, __LINE__);
-               $REP += SQL_AFFECTEDROWS();
+               $repairedWeights += SQL_AFFECTEDROWS();
 
                // Count one up
                $cnt++;
-       }
-}
+       } // END - while
+} // END - foreach
 
 // Repair finished
-if ($REP > 0) {
-       $message = getMaskedMessage('ADMIN_REPAIR_ENTRIES_FIXED', $REP);
+if ($repairedWeights > 0) {
+       $message = getMaskedMessage('ADMIN_REPAIR_ENTRIES_FIXED', $repairedWeights);
 } else {
        $message = '{--ADMIN_REPAIR_NOTHING_FIXED--}';
 }
index 43de04889b35120e41da8ec646ba78a606b41453..af1420e77eadad4541423c93838bdeb7db71fd63 100644 (file)
@@ -872,7 +872,10 @@ function removeReceiver (&$receivers, $key, $userid, $pool_id, $stats_id = '', $
                if ($stats_id > 0) {
                        // Only when we got a real stats id continue searching for the entry
                        $type = 'NORMAL'; $rowName = 'stats_id';
-                       if ($bonus) { $type = 'BONUS'; $rowName = 'bonus_id'; }
+                       if ($bonus) {
+                               $type = 'BONUS';
+                               $rowName = 'bonus_id';
+                       } // END - if
 
                        // Try to look the entry up
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE %s='%s' AND `userid`=%s AND link_type='%s' LIMIT 1",
@@ -891,8 +894,8 @@ function removeReceiver (&$receivers, $key, $userid, $pool_id, $stats_id = '', $
 
                        // Free memory
                        SQL_FREERESULT($result);
-               }
-       }
+               } // END - if
+       } // END - if
 
        // Return status for sending routine
        return $ret;