X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Foverview-inc.php;h=cfbd6efc5fcfe36926f622234d007dc4e6920133;hb=53b5edd1ee2b126087000ff842ac7bd0feea8814;hp=23501fea9938f4b76b100f23e5a985fa9f8b8c4e;hpb=7f104f6fe558bb56b4205241435a2357c2feece1;p=mailer.git diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index 23501fea99..cfbd6efc5f 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -94,8 +94,9 @@ function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) { SQL_FREERESULT($result); } // END - if - // Update extension - if (!empty($ext_ver)) EXTENSION_UPDATE($file, $ext, $ext_ver); + // Update extension if extension is installed and outdated + //* DEBUG: */ print "ext={$ext},ver={$ext_ver}/".GET_EXT_VERSION($ext)."
\n"; + if ((!empty($ext_ver)) && (EXT_IS_ACTIVE($ext)) && (GET_EXT_VERSION($ext) > $ext_ver)) EXTENSION_UPDATE($file, $ext, $ext_ver); if (!empty($cacheArray['active_extensions'][$ext])) { // Maybe we want to keept the current extension active? @@ -277,6 +278,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; } @@ -356,6 +358,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; } @@ -410,8 +413,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) @@ -421,16 +426,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, @@ -441,7 +445,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") && (GET_EXT_VERSION($infos) == "")) { + // 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