$jobsDone = true;
// Open the extension directory
- $handle = opendir(constant('PATH')."inc/extensions/") or mxchange_die("Cannot read extension directory!");
- while ($file = readdir($handle)) {
+ $extensionList = GET_DIR_AS_ARRAY("inc/extensions/", "ext-", false, false);
+ foreach ($extensionList as $file) {
// Is this file an extension?
if ((substr($file, 0, 4) == "ext-") && (substr($file, -4) == ".php")) {
//* DEBUG: */ echo $file."<br />\n";
} // END - if
}
} // END - if
- } // END - while
-
- // Close directory handle
- closedir($handle);
+ } // END - foreach
// At last - but not least - check for own and new unassigned tasks...
$result_tasks = SQL_QUERY_ESC("SELECT id, assigned_admin, userid, task_type, subject, text, task_created
// There are uncompleted jobs!
// @TODO Rewrite this to one template and use $OUT = ...
- LOAD_TEMPLATE("admin_overview_header");
$OUT = ""; $SW = 2;
while ($content = SQL_FETCHARRAY($result_tasks)) {
// Init infos
// Do we have extension task?
if (($content['task_type'] == "EXTENSION") && (GET_EXT_VERSION($content['infos']) == "")) {
// Load extension row template
- // @TODO Rewrite this to $OUT .= ..., true, ...
- LOAD_TEMPLATE("admin_overview_list_ext_rows", false, $content);
+ $OUT .= LOAD_TEMPLATE("admin_overview_list_ext_rows", true, $content);
} else {
// Load default row template
- // @TODO Rewrite this to $OUT .= ..., true, ...
- LOAD_TEMPLATE("admin_overview_list_rows", false, $content);
+ $OUT .= LOAD_TEMPLATE("admin_overview_list_rows", true, $content);
}
// Switch color
SQL_FREERESULT($result_tasks);
// Load footer template
- LOAD_TEMPLATE("admin_overview_footer");
+ LOAD_TEMPLATE("admin_overview_table", false, $OUT);
}
}
//