X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_task.php;h=18749aaa981560b649dc6997ca3779f285de233e;hp=fb6eb9080f023e3c33945457ec2878d865e91d5a;hb=f2aeaab0cd313b2eeb151642455ed558f6b186dc;hpb=d0d885e08aba45b77818d49bcf40396bf788c386 diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index fb6eb9080f..18749aaa98 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -1,7 +1,7 @@ 0)) { + if ((isPostRequestParameterSet('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 { @@ -105,16 +106,16 @@ ORDER BY __FILE__, __LINE__); if ((countPostSelection() > 0) && (!isDemoModeActive())) { // Only unassign / delete tasks when there are selected tasks posted - if (isPostRequestElementSet('unassign')) { + if (isPostRequestParameterSet('unassign')) { // Unassign from tasks - foreach (postRequestElement('task') as $id => $sel) { + foreach (postRequestParameter('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')) { + } // END - foreach + } elseif (isFormSent('del')) { // Delete tasks - foreach (postRequestElement('task') as $id => $sel) { - if (getRequestElement('type') == 'deleted') { + foreach (postRequestParameter('sel') as $id => $sel) { + if (getRequestParameter('type') == 'deleted') { // Delete task immediately SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s LIMIT 1", array(bigintval($id)),__FILE__, __LINE__); @@ -122,10 +123,10 @@ 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))); + debug_report_bug(__FILE__, __LINE__, sprintf("Unknown task action performed. data=
%s
", print_r(postRequestArray(), true))); } // Update query @@ -141,11 +142,11 @@ ORDER BY } // There are uncompleted jobs! - $type = getMessage('ADMIN_OVERVIEW_TASK_'.strtoupper(getRequestElement('type')).'_TYPE'); + $type = '{--ADMIN_OVERVIEW_TASK_' . strtoupper(getRequestParameter('type')) . '_TYPE--}'; // @TODO Rewrite these templates to one and add $OUT loadTemplate('admin_overview_header_task', false, array( 'message' => $type, - 'type' => getRequestElement('type') + 'type' => getRequestParameter('type') )); $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_tasks)) { @@ -156,7 +157,7 @@ ORDER BY $content['assigned_admin'] = generateAdminLink($content['assigned_admin']); // Get admin task - $content['task_type_msg'] = getMessage('ADMIN_TASK_IS_'.strtoupper($content['task_type']).''); + $content['task_type_msg'] = '{--ADMIN_TASK_IS_' . strtoupper($content['task_type']) . '--}'; // Generate infos switch ($content['task_type']) { @@ -167,7 +168,7 @@ ORDER BY } // END - switch // Member assigned with task? - if ($content['userid'] > 0) { + if (isValidUserId($content['userid'])) { // Member found otherwise it's a system task $content['userid'] = generateUserProfileLink($content['userid']); } else { @@ -176,7 +177,7 @@ ORDER BY } // Prepare content - // @TODO Rewritings: admin->assigned_admin,userid->userid,type->task_type_msg in template + // @TODO Rewritings: admin->assigned_admin,type->task_type_msg in template $content = merge_array($content, array( 'sw' => $SW, 'admin' => $content['assigned_admin'], @@ -198,13 +199,13 @@ ORDER BY // Switch colors $SW = 3 - $SW; - } + } // END - while // Free memory SQL_FREERESULT($result_tasks); // Load footer template - if (getRequestElement('type') == 'deleted') { + if (getRequestParameter('type') == 'deleted') { // Delete now button loadTemplate('admin_overview_footer_task'); } else { @@ -212,7 +213,7 @@ ORDER BY loadTemplate('admin_overview_footer'); } } -} +} // END - if // [EOF] ?>