X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_task.php;h=c14cecc846a550faf536bb2eeaeaf621f5bb10c2;hb=65ed873eefdacdcea3331773b6458a06a5adff82;hp=b0d7f96980f0931c4fef8535cfbde2a26607052d;hpb=9afd6ec5878544a7982c50ed9c0dd7de37606d5b;p=mailer.git diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index b0d7f96980..c14cecc846 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -1,7 +1,7 @@ 0)) { + if ((isPostRequestElementSet('assign')) && (countPostSelection() > 0)) { // Assign / do tasks - loadIncludeOnce("inc/modules/admin/overview-inc.php"); + loadIncludeOnce('inc/modules/admin/overview-inc.php'); if (empty($dmy)) $dmy = ''; outputSeletectedTasks(postRequestArray(), $dmy); } else { @@ -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__); - } + } // END - foreach } 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", @@ -125,7 +122,7 @@ ORDER BY // Mark task as to be deleted (purged by autopurge extension) adminDeleteTask($id); } - } + } // END - foreach } else { // Unknown action performed debug_report_bug(sprintf("Unknown task action performed. data=
%s
", print_r(postRequestArray(), true))); @@ -201,7 +198,7 @@ ORDER BY // Switch colors $SW = 3 - $SW; - } + } // END - while // Free memory SQL_FREERESULT($result_tasks); @@ -215,7 +212,7 @@ ORDER BY loadTemplate('admin_overview_footer'); } } -} +} // END - if // [EOF] ?>