X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_task.php;h=3d842ec5d5e42d8085f1a0a5985f614f8602306f;hb=8ce32e702f3caa76b8d446902948e83e1e6854c8;hp=29e6a73c96993ebe8e99042b73a6583d8dde9872;hpb=db0c6702086eea2c44d0aae1702dc2e77a0afc4e;p=mailer.git diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index 29e6a73c96..3d842ec5d5 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -17,7 +17,7 @@ * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -43,15 +43,12 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (!isExtensionActive('task')) { - displayMessage(generateExtensionInactiveNotInstalledMessage('task')); - return; -} // END - if - $whereStatement = ''; -if (!isGetRequestParameterSet('type')) setGetRequestParameter('type', 'your'); +if (!isGetRequestElementSet('type')) { + setGetRequestElement('type', 'your'); +} // END - if -switch (getRequestParameter('type')) { +switch (getRequestElement('type')) { case 'your': // List only your own open (new) tasks $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='NEW' AND `task_type` != 'EXTENSION_UPDATE'"; break; @@ -77,13 +74,13 @@ switch (getRequestParameter('type')) { break; default: // Unknown type - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", getRequestParameter('type'))); - displayMessage(getMaskedMessage('ADMIN_TASK_UNKNOWN_MODE', getRequestParameter('type'))); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", getRequestElement('type'))); + displayMessage('{%message,ADMIN_TASK_UNKNOWN_MODE' . getRequestElement('type') . '%}'); break; } // END - switch if (!empty($whereStatement)) { - if ((isPostRequestParameterSet('assign')) && (ifPostContainsSelections())) { + if ((isPostRequestElementSet('assign')) && (ifPostContainsSelections())) { // Assign / do tasks loadIncludeOnce('inc/modules/admin/overview-inc.php'); if (empty($dmy)) $dmy = ''; @@ -91,7 +88,7 @@ if (!empty($whereStatement)) { } else { // Start listing tasks matching selected filter $result_tasks = SQL_QUERY('SELECT - `id`, `assigned_admin`, `userid`, `task_type`, `subject`, `text`, `task_created` + `id`,`assigned_admin`,`userid`,`task_type`,`subject`,`text`,`task_created` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE @@ -104,16 +101,16 @@ ORDER BY __FILE__, __LINE__); if ((ifPostContainsSelections()) && (!isDemoModeActive())) { // Only unassign / delete tasks when there are selected tasks posted - if (isPostRequestParameterSet('unassign')) { + if (isPostRequestElementSet('unassign')) { // Unassign from tasks - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=NULL WHERE `id`=%s AND `assigned_admin`=%s LIMIT 1", array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__); } // END - foreach } elseif (isFormSent('delete')) { // Delete tasks - foreach (postRequestParameter('sel') as $id => $sel) { - if (getRequestParameter('type') == 'deleted') { + 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", array(bigintval($id)),__FILE__, __LINE__); @@ -129,7 +126,7 @@ ORDER BY // Update query $result_tasks = SQL_QUERY('SELECT - `id`, `assigned_admin`, `userid`, `task_type`, `subject`, `text`, `task_created` + `id`,`assigned_admin`,`userid`,`task_type`,`subject`,`text`,`task_created` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE @@ -145,9 +142,6 @@ ORDER BY // Init infos $content['infos'] = ''; - // Get admin task - $content['task_type_msg'] = '{--ADMIN_TASK_IS_' . strtoupper($content['task_type']) . '--}'; - // Generate infos switch ($content['task_type']) { case 'EXTENSION': @@ -162,14 +156,11 @@ ORDER BY $content['userid'] = generateUserProfileLink($content['userid']); } else { // Is a system task! - $content['userid'] = '{--ADMIN_IS_SYSTEM_TASK--}'; + $content['userid'] = '{--ADMIN_IS_SYSTEM_TASK--}'; } // Prepare content $content = merge_array($content, array( - 'assign_admin' => $content['assigned_admin'], - 'userid' => $content['userid'], - 'task_type_msg' => $content['task_type_msg'], 'task_created' => generateDateTime($content['task_created'], 2) )); @@ -188,13 +179,13 @@ ORDER BY // Prepare content $content = array( - 'message' => '{--ADMIN_OVERVIEW_TASK_' . strtoupper(getRequestParameter('type')) . '_TYPE--}', - 'type' => getRequestParameter('type'), + 'message' => '{--ADMIN_OVERVIEW_TASK_' . strtoupper(getRequestElement('type')) . '_TYPE--}', + 'type' => getRequestElement('type'), 'rows' => $OUT ); // Load footer template - if (getRequestParameter('type') == 'deleted') { + if (getRequestElement('type') == 'deleted') { // Delete now button loadTemplate('admin_list_task_delete', false, $content); } else {