Replace double-quotes with single
authorRoland Häder <roland@mxchange.org>
Sun, 6 Jan 2013 21:56:33 +0000 (21:56 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 6 Jan 2013 21:56:33 +0000 (21:56 +0000)
inc/modules/admin/overview-inc.php
inc/modules/member/what-categories.php
inc/modules/member/what-order.php

index 1191a1ea88bcb8e9fd032a4c338b01031fe876f8..3e800b811d4b375edf35a88f509aa2bede930030 100644 (file)
@@ -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--}';
                        }
index 35f21dda296047469278ee50c2e8d458d0863fba..bb928879ff3dbc1ec32103cf0d77818d3eaa3a90 100644 (file)
@@ -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
index d272ef36e25ff07654e7186a4531f3b5ce37db37..a1ee17e7e3543152dbd71660b51f3f47391de955 100644 (file)
@@ -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())) {