Next wave of lesser getMessage() usage and more EL
[mailer.git] / inc / modules / admin / what-list_task.php
index 2249daa7c480d87e16597516d5c30d7c67059d1b..18749aaa981560b649dc6997ca3779f285de233e 100644 (file)
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -111,7 +112,7 @@ ORDER BY
                                        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 (isPostRequestParameterSet('del')) {
+                       } elseif (isFormSent('del')) {
                                // Delete tasks
                                foreach (postRequestParameter('sel') as $id => $sel) {
                                        if (getRequestParameter('type') == 'deleted') {
@@ -125,7 +126,7 @@ ORDER BY
                                } // END - foreach
                        } else {
                                // Unknown action performed
-                               debug_report_bug(sprintf("Unknown task action performed. data=<pre>%s</pre>", print_r(postRequestArray(), true)));
+                               debug_report_bug(__FILE__, __LINE__, sprintf("Unknown task action performed. data=<pre>%s</pre>", print_r(postRequestArray(), true)));
                        }
 
                        // Update query
@@ -141,7 +142,7 @@ ORDER BY
                }
 
                // There are uncompleted jobs!
-               $type = getMessage('ADMIN_OVERVIEW_TASK_'.strtoupper(getRequestParameter('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,
@@ -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'],