categorize cronjob on cronjob-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -35,11 +35,8 @@ if ($page == 'cronjobs' || $page == 'overview') {
|
|||||||
);
|
);
|
||||||
$paging = new paging($userinfo, TABLE_PANEL_CRONRUNS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
$paging = new paging($userinfo, TABLE_PANEL_CRONRUNS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||||
|
|
||||||
/*
|
|
||||||
* @TODO Fix sorting
|
|
||||||
*/
|
|
||||||
$crons = '';
|
$crons = '';
|
||||||
$result_stmt = Database::prepare("SELECT `c`.* FROM `" . TABLE_PANEL_CRONRUNS . "` `c` ORDER BY `cronfile` ASC");
|
$result_stmt = Database::prepare("SELECT `c`.* FROM `" . TABLE_PANEL_CRONRUNS . "` `c` ORDER BY `module` ASC, `cronfile` ASC");
|
||||||
Database::pexecute($result_stmt);
|
Database::pexecute($result_stmt);
|
||||||
$paging->setEntries(Database::num_rows());
|
$paging->setEntries(Database::num_rows());
|
||||||
$sortcode = $paging->getHtmlSortCode($lng);
|
$sortcode = $paging->getHtmlSortCode($lng);
|
||||||
@@ -49,8 +46,14 @@ if ($page == 'cronjobs' || $page == 'overview') {
|
|||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
$cmod = '';
|
||||||
|
|
||||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
if ($cmod != $row['module']) {
|
||||||
|
$module = ucfirst(explode("/", $row['module'])[1]);
|
||||||
|
eval("\$crons.=\"" . getTemplate('cronjobs/cronjobs_cronjobmodule') . "\";");
|
||||||
|
$cmod = $row['module'];
|
||||||
|
}
|
||||||
if ($paging->checkDisplay($i)) {
|
if ($paging->checkDisplay($i)) {
|
||||||
$row = htmlentities_array($row);
|
$row = htmlentities_array($row);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<tr>
|
||||||
|
<td colspan="5"><b>{$module}</b></td>
|
||||||
|
</tr>
|
||||||
3
templates/Sparkle/admin/cronjobs/cronjobs_cronjobmodule.tpl
vendored
Normal file
3
templates/Sparkle/admin/cronjobs/cronjobs_cronjobmodule.tpl
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<tr>
|
||||||
|
<td colspan="5"><b>{$module}</b></td>
|
||||||
|
</tr>
|
||||||
Reference in New Issue
Block a user