More rewrites, and output-mode fixed (we should documentate this)
[mailer.git] / inc / modules / admin / overview-inc.php
index eb26099948c75b6619d067187dd2c16e51762418..2a09cb95a0b68f95b4cbe16164ef3137e2f6c0fb 100644 (file)
@@ -150,7 +150,7 @@ LIMIT 1",
                                // Task is valid...
                                list($tid, $userid, $type, $subj, $text, $created, $status, $adminId) = SQL_FETCHROW($result_task);
 
-                               if ($adminId == '0') {
+                               if ($adminId == 0) {
                                        // Assgin current admin to unassgigned task
                                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE `id`=%s LIMIT 1",
                                        array(getCurrentAdminId(), bigintval($tid)), __FILE__, __LINE__);
@@ -264,7 +264,7 @@ LIMIT 1",
                                        'subject'   => $subj,
                                        'add'       => $add,
                                        'text'      => $text,
-                                       'created'   => generateDateTime($created, '1'),
+                                       'created'   => generateDateTime($created, 1),
                                        'extension' => $ext_name
                                );
 
@@ -280,7 +280,7 @@ LIMIT 1",
                                                        array($ext_name), __FILE__, __LINE__);
                                                $lines = SQL_NUMROWS($result_lines);
                                                SQL_FREERESULT($result_lines);
-                                               if ($lines == '0') {
+                                               if ($lines == 0) {
                                                        // New extension found
                                                        $OUT .= loadTemplate('admin_ext_reg_form', true, array(
                                                                'id'       => bigintval($id),
@@ -397,7 +397,7 @@ LIMIT 1",
                // Load final template
                loadTemplate('admin_overview_list', false, $OUT);
        } else {
-               if ((isset($postData['task'])) && ((count($postData['task']) > 0) || ($postData['task'][0] == '1'))) {
+               if ((isset($postData['task'])) && ((count($postData['task']) > 0) || ($postData['task'][0] == 1))) {
                        // Only unassign / delete tasks when there are selected tasks posted
                        if (!empty($postData['unassign'])) {
                                // Unassign from tasks
@@ -455,7 +455,7 @@ LIMIT 1",
                                'assigned_admin' => $content['assigned_admin'],
                                'userid'         => $content['userid'],
                                'task_type_msg'  => $content['task_type_msg'],
-                               'created'        => generateDateTime($content['task_created'], '2')
+                               'created'        => generateDateTime($content['task_created'], 2)
                        ));
 
                        // Do we have extension task?