From: Roland Häder Date: Sun, 11 Jul 2010 22:54:50 +0000 (+0000) Subject: Lesser use of double-quotes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4cc62618b7a59c6641b057c34047b2dd531c16ad;p=mailer.git Lesser use of double-quotes --- diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index a840198c4a..b0fd3a9943 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -177,8 +177,8 @@ WHERE function addReferalRallyePrices ($rallye, $mode = 'email') { // Output mode switch($mode) { - case 'email': $mode = "\n"; break; - case 'html' : $mode = "
\n"; break; + case 'email': $mode = "\n"; break; + case 'html' : $mode = '
'; break; } // END - switch // Load prices diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 81810de1d1..97034d5b9b 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -423,7 +423,7 @@ function saveSponsorData ($postData, $content) { $sql = "UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET"; foreach ($postData as $key => $value) { // Mmmmm, too less security here??? - $sql .= " `".secureString($key)."`='%s',"; + $sql .= " `" . secureString($key) . "`='%s',"; // We will secure this later inside the SQL_QUERY_ESC() function $DATA[] = secureString($value); @@ -448,7 +448,7 @@ function saveSponsorData ($postData, $content) { $sql = substr($sql, 0, -1); // Add SQL tail data - $sql .= " WHERE `id`=%s AND password='%s' LIMIT 1"; + $sql .= " WHERE `id`=%s AND `password`='%s' LIMIT 1"; $DATA[] = bigintval(getSession('sponsorid')); $DATA[] = getSession('sponsorpass'); diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 8a4d323619..92655c6666 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -189,8 +189,8 @@ function SURFBAR_MEMBER_ACTIONS ($urlId, $status) { $actionArray = SURFBAR_GET_ARRAY_FROM_STATUS($status); // Init HTML code - $OUT = " -\n"; + $OUT = '
+'; // Calculate width $width = round(100 / count($actionArray)); @@ -208,8 +208,8 @@ function SURFBAR_MEMBER_ACTIONS ($urlId, $status) { } // END - foreach // Close table - $OUT .= " -
\n"; + $OUT .= ' +'; // Return code return $OUT; diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index d86210f531..01d81014c5 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -40,7 +40,7 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!isAdmin())) { die(); -} +} // END - if // Add description as navigation point addMenuDescription('admin', __FILE__); @@ -56,7 +56,7 @@ if (!isFormSent()) { $menus = array(); $titles = array(); $below = array(); // Get all available main menus - $result = SQL_QUERY("SELECT + $result_menu = SQL_QUERY("SELECT `action`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` @@ -64,10 +64,10 @@ WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__); - if (!SQL_HASZERONUMS($result)) { + if (!SQL_HASZERONUMS($result_menu)) { // Read menu structure // @TODO Cant this be rewritten? - while ($content = SQL_FETCHARRAY($result)) { + while ($content = SQL_FETCHARRAY($result_menu)) { // Menu actions $menus[] = $content['action']; @@ -78,9 +78,6 @@ ORDER BY $below[] = $content['sort'] + 1; } // END - while - // Free memory - SQL_FREERESULT($result); - // Remove double eintries // @TODO This can be somehow rewritten to a function $prev = ''; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below; @@ -128,10 +125,7 @@ ORDER BY `sort` ASC", // Below this menu point should the new be added so we simply increase the sort value by 1 :-) $below[$value_main][] = $content['sort'] + 1; - } - - // Free memory - SQL_FREERESULT($result); + } // END - while // Remove double eintries // @TODO This can be somehow rewritten to a function @@ -144,34 +138,40 @@ ORDER BY `sort` ASC", } else { $prev = $value; } - } + } // END - foreach // Transfer dummy array $menus[$value_main] = $dmy; $titles[$value_main] = $dmy2; $below[$value_main] = $dmy3; - } - } - } + } // END - if + + // Free memory + SQL_FREERESULT($result); + } // END - foreach + } // END - if + + // Free memory + SQL_FREERESULT($result_menu); - $OUT = " + '; foreach ($below as $key => $m) { if (is_array($m)) { foreach ($m as $key2 => $m2) { - $OUT .= " \n"; + $OUT .= ''; } } else { - $OUT .= " \n"; + $OUT .= ''; } } - $OUT .= ""; + $OUT .= ''; // Prepare selections for template $content['below_selection'] = $OUT; diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index 61be3eca8e..90ca4a69ac 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -143,24 +143,24 @@ if (!isFormSent()) { } // END - foreach } // END - if - $OUT = " + '; foreach ($below as $key => $m) { if (is_array($m)) { foreach ($m as $key2 => $m2) { - $OUT .= " \n"; + $OUT .= ''; } // END - foreach } else { - $OUT .= " \n"; + $OUT .= ''; } } - $OUT .= ""; + $OUT .= ''; // Prepare selection boxes for template $content['below_selection'] = $OUT; diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index 9dd3fe9102..06cb3d8977 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -140,7 +140,7 @@ switch (getConfig('guest_stats')) { // Generate monthly stats $SW = 2; $r2 = ' right'; $l = 'll'; $r = 'lr'; $OUT = ''; foreach ($months as $month => $cnt) { - if ($SW == 2) $OUT .= "\n"; + if ($SW == 2) $OUT .= ''; // Prepare data for template $data = array( @@ -158,7 +158,7 @@ switch (getConfig('guest_stats')) { $r2 = ''; $l = 'rl'; $r = 'rr'; } else { - $OUT .= "\n"; + $OUT .= ''; $r2 = ' right'; $l = 'll'; $r = 'lr'; } diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 4d55270d0e..04bd239f22 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -170,11 +170,11 @@ LIMIT 1", if (isExtensionActive('country')) { // Generate selection box - $OUT = "'; $whereStatement = "WHERE `is_active`='Y'"; if (isAdmin()) $whereStatement = ''; $OUT .= generateOptionList('countries', 'id', 'descr', $content['country_code'], 'code', $whereStatement); - $OUT .= ""; + $OUT .= ''; $content['country'] = $OUT; } else { // Ouput default input box diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php index f7381e612b..c53797daa0 100644 --- a/inc/modules/member/what-themes.php +++ b/inc/modules/member/what-themes.php @@ -114,19 +114,19 @@ foreach ($THEMES['theme_unix'] as $key => $unix) { // Add row // @TODO Move this code into a template - $OUT .= " - - + $OUT .= ' + + - ".$THEMES['theme_name'][$key]." - - ".$THEMES['theme_author'][$key]." + ' . $THEMES['theme_name'][$key] . ' + + ' . $THEMES['theme_author'][$key] . ' - - ".$THEMES['theme_url'][$key]." + + ' . $THEMES['theme_url'][$key] . ' - v".$THEMES['theme_version'][$key]." -\n"; + v' . $THEMES['theme_version'][$key] . ' +'; } // END - foreach if (empty($OUT)) { diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index 85bff3a9f4..a141f3009a 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -217,11 +217,11 @@ switch ($mode) { if (!SQL_HASZERONUMS($result)) { // Load list - $OUT = " + '; // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries while (list($userid, $nick) = SQL_FETCHROW($result)) { - $OUT .= "