]> git.mxchange.org Git - mailer.git/commitdiff
Also these SQLs require support for NULL
authorRoland Häder <roland@mxchange.org>
Thu, 11 Aug 2011 17:21:05 +0000 (17:21 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 11 Aug 2011 17:21:05 +0000 (17:21 +0000)
inc/modules/admin/overview-inc.php

index 72007a445f240a54290ee710454226e89fca82f6..80b11f7c4ea9a618f6516f519907da72dc80ecce 100644 (file)
@@ -43,7 +43,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // @TODO This function does also check for uncompleted tasks
 function outputStandardOverview (&$result_tasks) {
        // First check for solved and not assigned tasks and assign them to current admin
-       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE assigned_admin < 1 AND status != 'NEW'",
+       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE `assigned_admin` IS NULL AND status != 'NEW'",
                array(getCurrentAdminId()), __FILE__, __LINE__);
 
        // We currently don't want to install an extension so let's find out if we need...
@@ -151,7 +151,7 @@ LIMIT 1",
 
                                if ($taskData['assigned_admin'] == '0') {
                                        // Assgin current admin to unassgigned task
-                                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE `id`=%s AND `assigned_admin`=NULL LIMIT 1",
+                                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE `id`=%s AND `assigned_admin` IS NULL LIMIT 1",
                                                array(
                                                        getCurrentAdminId(),
                                                        bigintval($taskData['id'])
@@ -403,7 +403,7 @@ LIMIT 1",
                        } elseif (isset($postData['delete'])) {
                                // Delete tasks
                                foreach ($postData['sel'] as $taskId => $sel) {
-                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s AND `assigned_admin` IN (%s,0) LIMIT 1",
+                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s AND `assigned_admin` IN (%s,0,NULL) LIMIT 1",
                                                array(bigintval($taskId), getCurrentAdminId()), __FILE__, __LINE__);
                                } // END - foreach
                        } else {