More HTML swapped and admin contact link rewritten. Resolves #91
[mailer.git] / inc / modules / admin / what-list_task.php
index 652fb04..c4a4540 100644 (file)
@@ -127,21 +127,11 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L
                ));
                $SW = 2;
                while (list($id, $admin, $uid, $type, $subj, $text, $created) = SQL_FETCHROW($result_tasks)) {
+                       // Init infos
                        $infos = "---";
-                       if ($admin == "0") {
-                               // No admin currently is assigned
-                               $admin = "<div class=\"admin_note\">{--ADMIN_NO_ADMIN_ASSIGNED--}</div>";
-                       } else {
-                               // Load admin's data
-                               $login = GET_ADMIN_LOGIN($admin);
-                               if ($login != "***") {
-                                       // Admin found
-                                       $admin = "<a href=\"{!URL!}/modules.php?module=admin&amp;what=admins_contct&amp;admin=".$admin."\">".$login."</a>";
-                               } else {
-                                       // Maybe deleted?
-                                       $admin = "<div class=\"admin_note\">".ADMIN_ID_404_1.$admin.ADMIN_ID_404_2."</div>";
-                               }
-                       }
+
+                       // Generate link
+                       $admin = GENERATE_AID_LINK($admin);
 
                        // Get admin task
                        $type_out = constant('ADMIN_TASK_IS_'.strtoupper($type).'');