]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Fix for marking categories in registration page
[mailer.git] / inc / mysql-manager.php
index a96b22392bb58706bb7de976607f4033388ccad9..4b7d94ccc4e2b8f2f939c4139a0afc07a45fc577 100644 (file)
@@ -611,17 +611,15 @@ function isMember () {
                                $ret = true;
                        } else {
                                // Maybe got locked etc.
-                               //* DEBUG: */ print(__LINE__."!!!<br />");
+                               logDebugMessage(__FUNCTION__, __LINE__, 'status=' . getUserData('status'));
                                destroyMemberSession();
                        }
                } else {
                        // Cookie data is invalid!
-                       //* DEBUG: */ print(__LINE__."***<br />");
                        destroyMemberSession();
                }
        } else {
                // Cookie data is invalid!
-               //* DEBUG: */ print(__LINE__."///<br />");
                destroyMemberSession();
        }
 
@@ -1871,7 +1869,10 @@ function generateCategoryOptionsList ($mode) {
        );
 
        // Get categories
-       $result = SQL_QUERY("SELECT id, cat FROM `{?_MYSQL_PREFIX?}_cats`".$whereStatement." ORDER BY `sort`", __FUNCTION__, __LINE__);
+       $result = SQL_QUERY("SELECT `id`, `cat` FROM `{?_MYSQL_PREFIX?}_cats`".$whereStatement." ORDER BY `sort` ASC",
+               __FUNCTION__, __LINE__);
+
+       // Do we have entries?
        if (SQL_NUMROWS($result) > 0) {
                // ... and begin loading stuff
                while ($content = SQL_FETCHARRAY($result)) {
@@ -1892,7 +1893,9 @@ function generateCategoryOptionsList ($mode) {
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
-       `userid`=%s AND `status`='CONFIRMED' AND `receive_mails` > 0".runFilterChain('exclude_users', $mode)."
+       `userid`=%s AND
+       `status`='CONFIRMED' AND
+       `receive_mails` > 0".runFilterChain('exclude_users', $mode)."
 LIMIT 1",
                                        array(bigintval($ucat)), __FUNCTION__, __LINE__);
 
@@ -2224,7 +2227,7 @@ function reduceRecipientReceivedMails ($column, $id, $count) {
 function createNewTask ($subject, $notes, $taskType, $userid = '0', $adminId = '0', $strip = true) {
        // Insert the task data into the database
        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_task_system` (`assigned_admin`, `userid`, `status`, `task_type`, `subject`, `text`, `task_created`) VALUES (%s,%s,'NEW','%s','%s','%s', UNIX_TIMESTAMP())",
-               array($adminId, $userid, $taskType, $subject, smartAddSlashes($notes)), __FUNCTION__, __LINE__, true, $strip);
+               array($adminId, $userid, $taskType, $subject, escapeQuotes($notes)), __FUNCTION__, __LINE__, true, $strip);
 }
 
 // Updates last module / online time