Changed all admin getter, closed internal TODOs:
[mailer.git] / inc / modules / admin / what-list_task.php
index c118741a5fa54641a631e465fbe40dab89541e60..f487a432a2bb08bee05c4afdcf36a62f112dbd0e 100644 (file)
@@ -142,20 +142,11 @@ ORDER BY
                }
 
                // There are uncompleted jobs!
-               $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'    => getRequestParameter('type')
-               ));
                $OUT = ''; $SW = 2;
                while ($content = SQL_FETCHARRAY($result_tasks)) {
                        // Init infos
                        $content['infos'] = '';
 
-                       // Generate link
-                       $content['assigned_admin'] = generateAdminLink($content['assigned_admin']);
-
                        // Get admin task
                        $content['task_type_msg'] = '{--ADMIN_TASK_IS_' . strtoupper($content['task_type']) . '--}';
 
@@ -177,24 +168,21 @@ ORDER BY
                        }
 
                        // Prepare content
-                       // @TODO Rewritings: admin->assigned_admin,type->task_type_msg in template
                        $content = merge_array($content, array(
-                               'sw'      => $SW,
-                               'admin'   => $content['assigned_admin'],
-                               'userid'  => $content['userid'],
-                               'type'    => $content['task_type_msg'],
-                               'created' => generateDateTime($content['task_created'], 2)
+                               'sw'            => $SW,
+                               'assign_admin'  => $content['assigned_admin'],
+                               'userid'        => $content['userid'],
+                               'task_type_msg' => $content['task_type_msg'],
+                               'task_created'  => generateDateTime($content['task_created'], 2)
                        ));
 
                        // Do we have an extension task?
                        if (($content['task_type'] == 'EXTENSION') && (isExtensionNameValid($content['infos'])) && (!isExtensionInstalled($content['infos']))) {
                                // Load extension row template
-                               // @TODO Rewrite this to $OUT .= ..., true, ...
-                               loadTemplate('admin_list_task_ext_rows', false, $content);
+                               $OUT .= loadTemplate('admin_list_task_ext_rows', true, $content);
                        } else {
                                // Load default row template
-                               // @TODO Rewrite this to $OUT .= ..., true, ...
-                               loadTemplate('admin_list_task_rows', false, $content);
+                               $OUT .= loadTemplate('admin_list_task_rows', true, $content);
                        }
 
                        // Switch colors
@@ -204,13 +192,20 @@ ORDER BY
                // Free memory
                SQL_FREERESULT($result_tasks);
 
+               // Prepare content
+               $content = array(
+                       'message' => '{--ADMIN_OVERVIEW_TASK_' . strtoupper(getRequestParameter('type')) . '_TYPE--}',
+                       'type'    => getRequestParameter('type'),
+                       'rows'    => $OUT
+               );
+
                // Load footer template
                if (getRequestParameter('type') == 'deleted') {
                        // Delete now button
-                       loadTemplate('admin_overview_footer_task');
+                       loadTemplate('admin_list_task_delete', false, $content);
                } else {
                        // Normal footer
-                       loadTemplate('admin_overview_footer');
+                       loadTemplate('admin_list_task', false, $content);
                }
        }
 } // END - if