X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-categories.php;h=35f21dda296047469278ee50c2e8d458d0863fba;hb=9a7e55141378f5323480fcbf33b033d2750392f4;hp=1789239edf630d7799e9a5130c6c882642c274c0;hpb=2df8c1757b41f35e7c5b6a92c52ca96ab1b0bcb8;p=mailer.git diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 1789239edf..35f21dda29 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -49,11 +49,11 @@ $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__); -// Do we have entries? +// Are there entries? if (!SQL_HASZERONUMS($result)) { - $LEAST = false; + $LEAST = FALSE; if (isFormSent()) { $count = '0'; foreach (postRequestElement('cat') as $categoryId => $joined) { @@ -62,7 +62,7 @@ if (!SQL_HASZERONUMS($result)) { if ((SQL_NUMROWS($result) - $count) < getLeastCats()) { unsetPostRequestElement('ok'); - $LEAST = true; + $LEAST = TRUE; } // END - if } // END - if @@ -80,9 +80,9 @@ 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; @@ -92,7 +92,7 @@ if (!SQL_HASZERONUMS($result)) { } // END - switch } // END - foreach - // Do we have entries? + // Are there entries? if (countSqls() > 0) { // Run SQL commands $count = runFilterChain('run_sqls'); @@ -107,7 +107,7 @@ if (!SQL_HASZERONUMS($result)) { displayMessage('{--MEMBER_CATEGORIES_NOT_SAVED--}'); } } else { - if ($LEAST === true) { + if ($LEAST === TRUE) { // Also here we have to secure it... :( displayMessage('{--CHOOSE_MORE_CATEGORIES--}'); } // END - if @@ -128,21 +128,21 @@ 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 } // Load row template - $OUT .= loadTemplate('member_cats_row', true, $content); + $OUT .= loadTemplate('member_cats_row', TRUE, $content); } // END - while // Free result SQL_FREERESULT($result); // Load footer template - loadTemplate('member_cats', false, $OUT); + loadTemplate('member_cats', FALSE, $OUT); } } else { // No cateogries are defined yet