* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
- * Needs to be in all Files and every File needs "svn propset *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2009, 2010 by Mailer Developer Team *
switch (getRequestParameter('type')) {
case 'your': // List only your own open (new) tasks
- $whereStatement = "`assigned_admin`='".getCurrentAdminId()."' AND `status`='NEW' AND `task_type` != 'EXTENSION_UPDATE'";
+ $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='NEW' AND `task_type` != 'EXTENSION_UPDATE'";
break;
case 'updates': // List only updates assigned to you
} // END - switch
if (!empty($whereStatement)) {
- if ((isPostRequestParameterSet('assign')) && (countPostSelection() > 0)) {
+ if ((isPostRequestParameterSet('assign')) && (ifPostContainsSelections())) {
// Assign / do tasks
loadIncludeOnce('inc/modules/admin/overview-inc.php');
if (empty($dmy)) $dmy = '';
`subject` ASC,
`task_created` DESC',
__FILE__, __LINE__);
- if ((countPostSelection() > 0) && (!isDemoModeActive())) {
+ if ((ifPostContainsSelections()) && (!isDemoModeActive())) {
// Only unassign / delete tasks when there are selected tasks posted
if (isPostRequestParameterSet('unassign')) {
// Unassign from tasks
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 (isFormSent('del')) {
+ } elseif (isFormSent('delete')) {
// Delete tasks
foreach (postRequestParameter('sel') as $id => $sel) {
if (getRequestParameter('type') == 'deleted') {
}
// There are uncompleted jobs!
- $OUT = ''; $SW = 2;
+ $OUT = '';
while ($content = SQL_FETCHARRAY($result_tasks)) {
// Init infos
$content['infos'] = '';
// Prepare content
$content = merge_array($content, array(
- 'sw' => $SW,
'assign_admin' => $content['assigned_admin'],
'userid' => $content['userid'],
'task_type_msg' => $content['task_type_msg'],
));
// Do we have an extension task?
- if (($content['task_type'] == 'EXTENSION') && (isExtensionNameValid($content['infos'])) && (!isExtensionInstalled($content['infos']))) {
+ if (isExtensionTask($content)) {
// Load extension row template
$OUT .= loadTemplate('admin_list_task_ext_rows', true, $content);
} else {
// Load default row template
$OUT .= loadTemplate('admin_list_task_rows', true, $content);
}
-
- // Switch colors
- $SW = 3 - $SW;
} // END - while
// Free memory