]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_task.php
Login procedure rewritten to filters (internal TODO)
[mailer.git] / inc / modules / admin / what-list_task.php
index b0d7f96980f0931c4fef8535cfbde2a26607052d..d51f0d6ab6b7123d3efd2d827adf407539729408 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 08/03/2004 *
- * ================                             Last change: 08/07/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 08/03/2004 *
+ * ===================                          Last change: 08/07/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-list_task.php                               *
@@ -84,10 +84,7 @@ switch (getRequestElement('type')) {
 }
 
 if (!empty($whereStatement)) {
-       $SEL = '0';
-       if (isPostRequestElementSet(('task'))) $SEL = countSelection(postRequestElement('task'));
-
-       if ((isPostRequestElementSet(('assign'))) && ($SEL > 0)) {
+       if ((isPostRequestElementSet('assign')) && (countPostSelection() > 0)) {
                // Assign / do tasks
                loadIncludeOnce("inc/modules/admin/overview-inc.php");
                if (empty($dmy)) $dmy = '';
@@ -106,17 +103,17 @@ ORDER BY
        `subject` ASC,
        `task_created` DESC',
                        __FILE__, __LINE__);
-               if (($SEL > 0) && (!isDemoModeActive())) {
+               if ((countPostSelection() > 0) && (!isDemoModeActive())) {
                        // Only unassign / delete tasks when there are selected tasks posted
                        if (isPostRequestElementSet('unassign')) {
                                // Unassign from tasks
-                               foreach (postRequestElement('task') as $id => $sel) {
+                               foreach (postRequestElement('sel') as $id => $sel) {
                                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=0 WHERE `id`=%s AND `assigned_admin`=%s LIMIT 1",
                                                array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
                                }
                        } elseif (isPostRequestElementSet('del')) {
                                // Delete tasks
-                               foreach (postRequestElement('task') as $id => $sel) {
+                               foreach (postRequestElement('sel') as $id => $sel) {
                                        if (getRequestElement('type') == 'deleted') {
                                                // Delete task immediately
                                                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s LIMIT 1",