From 167b7b3fded7327bb9a588854718623df42fbaf1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 6 Jan 2013 21:56:33 +0000 Subject: [PATCH] Replace double-quotes with single --- inc/modules/admin/overview-inc.php | 4 ++-- inc/modules/member/what-categories.php | 10 +++++----- inc/modules/member/what-order.php | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index 1191a1ea88..3e800b811d 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -181,7 +181,7 @@ LIMIT 1", } // END - if // Is a userid assign? - if ($taskData['userid'] > 0) { + if (isValidId($taskData['userid'])) { // Then load his data! if (fetchUserData($taskData['userid'])) { // Fetch row @@ -447,7 +447,7 @@ LIMIT 1", if (isValidId($content['userid'])) { // Member found otherwise it's a system task - $content['userid'] = generateUserProfileLink($content['userid']); + $content['userid'] = '{%pipe,generateUserProfileLink=' . $content['userid'] . '%}'; } else { $content['userid'] = '{--ADMIN_IS_SYSTEM_TASK--}'; } diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 35f21dda29..bb928879ff 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -49,7 +49,7 @@ $whereStatement = " WHERE `visible`='Y'"; if (isAdmin()) $whereStatement = ''; // Get all categories -$result = SQL_QUERY("SELECT `id`, `cat` FROM `{?_MYSQL_PREFIX?}_cats`".$whereStatement." ORDER BY `sort` ASC", __FILE__, __LINE__); +$result = SQL_QUERY('SELECT `id`, `cat` FROM `{?_MYSQL_PREFIX?}_cats`' . $whereStatement . ' ORDER BY `sort` ASC', __FILE__, __LINE__); // Are there entries? if (!SQL_HASZERONUMS($result)) { @@ -80,14 +80,14 @@ if (!SQL_HASZERONUMS($result)) { switch ($joined) { case 'Y': // Check if this category has an entry - if (countSumTotalData(getMemberId(), 'user_cats', 'id', 'userid', TRUE, sprintf(" AND `cat_id`=%s", bigintval($categoryId))) == 0) { + if (countSumTotalData(getMemberId(), 'user_cats', 'id', 'userid', TRUE, sprintf(' AND `cat_id`=%s', bigintval($categoryId))) == 0) { // No, so add it - addSql(sprintf("INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (`userid`, `cat_id`) VALUES (%s,%s)", getMemberId(), bigintval($categoryId))); + addSql(sprintf('INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (`userid`, `cat_id`) VALUES (%s,%s)', getMemberId(), bigintval($categoryId))); } // END - if break; case 'N': - addSql(sprintf("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1", getMemberId(), bigintval($categoryId))); + addSql(sprintf('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1', getMemberId(), bigintval($categoryId))); break; } // END - switch } // END - foreach @@ -128,7 +128,7 @@ if (!SQL_HASZERONUMS($result)) { } // END - if } else { // Check if he has an entry - if (countSumTotalData(getMemberId(), 'user_cats', 'id', 'userid', TRUE, sprintf(" AND `cat_id`=%s", bigintval($content['id']))) == 1) { + if (countSumTotalData(getMemberId(), 'user_cats', 'id', 'userid', TRUE, sprintf(' AND `cat_id`=%s', bigintval($content['id']))) == 1) { $content['jn'] = ''; $content['jy'] = ' checked="checked"'; } // END - if diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index d272ef36e2..a1ee17e7e3 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -212,7 +212,7 @@ LIMIT 1", SQL_FREERESULT($result_holiday); } // END - if - if ($holidayContent['userid'] > 0) { + if (isValidId($holidayContent['userid'])) { // Add receiver array_push($TEST, $holidayContent['userid']); $count++; @@ -435,14 +435,14 @@ LIMIT 1", if (isAdmin()) $whereStatement = ''; // Display order form - $result_cats = SQL_QUERY("SELECT + $result_cats = SQL_QUERY('SELECT `id`, `cat` FROM `{?_MYSQL_PREFIX?}_cats` -".$whereStatement." +' . $whereStatement . ' ORDER BY - `sort` ASC", __FILE__, __LINE__); + `sort` ASC', __FILE__, __LINE__); // Some categories found? if (!SQL_HASZERONUMS($result_cats)) { @@ -472,7 +472,7 @@ ORDER BY array_push($categories['name'], $categoriesContent['cat']); // Select users in current category - $result_userids = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s AND `userid` != '%s' ORDER BY `userid` ASC", + $result_userids = SQL_QUERY_ESC('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s AND `userid` != %s ORDER BY `userid` ASC', array(bigintval($categoriesContent['id']), getMemberId()), __FILE__, __LINE__); $userid_cnt = '0'; @@ -511,7 +511,7 @@ LIMIT 1", if ($isHolidayActive === FALSE) { // Check if the user want's to receive mails? - $result_ver = SQL_QUERY_ESC("SELECT `zip` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s".$HTML." AND `receive_mails` > 0 AND `status`='CONFIRMED' LIMIT 1", + $result_ver = SQL_QUERY_ESC("SELECT `zip` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s" . $HTML . " AND `receive_mails` > 0 AND `status`='CONFIRMED' LIMIT 1", array(bigintval($userid)), __FILE__, __LINE__); if ((SQL_NUMROWS($result_ver) == 1) && (isPostRequestElementSet('zip')) && (isOrderMultiPageEnabled())) { -- 2.39.2