X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Foverview-inc.php;h=db0af358c5b296fb8178d6fbd0e744d2d2c2bd2c;hp=101d3778de52b443dd9269f3bd69434492aa214f;hb=feda50ff73c05935417ed33164d30caf966ba854;hpb=ae51687a0bf708aeca3d68263320804ae0dd42ef
diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php
index 101d3778de..db0af358c5 100644
--- a/inc/modules/admin/overview-inc.php
+++ b/inc/modules/admin/overview-inc.php
@@ -37,9 +37,8 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
require($INC);
}
-function OUTPUT_STANDARD_OVERVIEW(&$result_tasks)
-{
- global $cacheArray, $cacheArray;
+function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) {
+ global $cacheArray, $_CONFIG;
// First check for solved and not assigned tasks and assign them to current admin
$result_task = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin='%s' WHERE assigned_admin < 1 AND status != 'NEW'",
@@ -278,6 +277,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
switch ($mode)
{
default: // Unknown support mode
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown support mode %s detected. This part is under construction!", $mode));
$OUT .= "".ADMIN_UNKNOWN_SUPPORT_MODE_1.$mode.ADMIN_UNKNOWN_SUPPORT_MODE_2."\n";
break;
}
@@ -357,6 +357,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
break;
default: // Unknown task type
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $type));
$OUT .= "".ADMIN_UNKNOWN_TASK_TYPE_1.$type.ADMIN_UNKNOWN_TASK_TYPE_2.$id.ADMIN_UNKNOWN_TASK_TYPE_3."\n";
break;
}
@@ -411,8 +412,10 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
$admin = "".ADMIN_ID_404_1.$admin.ADMIN_ID_404_2."";
}
}
- $evl = "\$type_out = ADMIN_TASK_IS_".strtoupper($type).";";
- eval($evl);
+
+ // Get task type
+ $type_out = constant('ADMIN_TASK_IS_'.strtoupper($type).'');
+
$type2 = substr($text, 0, strpos($text, ":"));
// Generate infos
switch ($type)
@@ -422,16 +425,15 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
$infos = substr($subj, 1, strpos($subj, ":") - 1);
break;
}
- if ($uid > 0)
- {
+
+ if ($uid > 0) {
// Member found otherwise it's a system task
$uid = ADMIN_USER_PROFILE_LINK($uid);
- }
- else
- {
+ } else {
$uid = "".ADMIN_IS_SYSTEM_TASK."";
}
+ // Prepare content
$content = array(
'sw' => $SW,
'id' => $id,
@@ -442,7 +444,16 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
'created' => MAKE_DATETIME($created, "2")
);
- LOAD_TEMPLATE("admin_overview_list_rows", false, $content);
+ // Do we have extension task?
+ if ($type == "EXTENSION") {
+ // Load extension row template
+ LOAD_TEMPLATE("admin_overview_list_ext_rows", false, $content);
+ } else {
+ // Load default row template
+ LOAD_TEMPLATE("admin_overview_list_rows", false, $content);
+ }
+
+ // Switch color
$SW = 3 - $SW;
}
// Free memory