Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 18, 2018
1 parent 7dba51c commit 86bc1c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
11 changes: 6 additions & 5 deletions htdocs/cron/card.php
Expand Up @@ -680,13 +680,14 @@ function initfields()
print $langs->trans('CronDtNextLaunch');
print ' ('.$langs->trans('CronFrom').')';
print "</td><td>";
//print '<strong>';
if (! $object->status) print $langs->trans("Disabled");
elseif (!empty($object->datenextrun)) { print img_picto('','object_calendarday').' '.dol_print_date($object->datenextrun,'dayhoursec');}
else {print $langs->trans('CronNone');}
//print '</strong>';
if ($object->maxrun && $object->nbrun >= $object->maxrun) print img_warning($langs->trans("MaxRunReached"));
elseif ($object->datenextrun && $object->datenextrun < $now) print img_warning($langs->trans("Late"));
else { print $langs->trans('CronNone'); }
if ($object->status == Cronjob::STATUS_ENABLED)
{
if ($object->maxrun && $object->nbrun >= $object->maxrun) print img_warning($langs->trans("MaxRunReached"));
elseif ($object->datenextrun && $object->datenextrun < $now) print img_warning($langs->trans("Late"));
}
print "</td></tr>";

print '</table>';
Expand Down
9 changes: 6 additions & 3 deletions htdocs/cron/list.php
Expand Up @@ -523,9 +523,12 @@
if (!empty($obj->datenextrun)) {
$datenextrun = $db->jdate($obj->datenextrun);
if (empty($obj->status)) print '<span class="opacitymedium">';
print dol_print_date($datenextrun,'dayhour');
if ($obj->maxrun && $obj->nbrun >= $obj->maxrun) print img_warning($langs->trans("MaxRunReached"));
elseif ($datenextrun && $datenextrun < $now) print img_warning($langs->trans("Late"));
print dol_print_date($datenextrun,'dayhoursec');
if ($obj->status == Cronjob::STATUS_ENABLED)
{
if ($obj->maxrun && $obj->nbrun >= $obj->maxrun) print img_warning($langs->trans("MaxRunReached"));
elseif ($datenextrun && $datenextrun < $now) print img_warning($langs->trans("Late"));
}
if (empty($obj->status)) print '</span>';
}
print '</td>';
Expand Down

0 comments on commit 86bc1c8

Please sign in to comment.