Fix status of crons
This commit is contained in:
parent
39c9efbc51
commit
f0cdaff936
@ -134,7 +134,7 @@ class modCron extends DolibarrModules
|
||||
$this->menu[$r] = array('fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left', // This is a Left menu entry
|
||||
'titre'=>'CronList',
|
||||
'url'=>'/cron/list.php?status=-2&leftmenu=admintools',
|
||||
'url'=>'/cron/list.php?leftmenu=admintools',
|
||||
'langs'=>'cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>200,
|
||||
'enabled'=>'$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
|
||||
@ -75,7 +75,7 @@ if (!empty($cancel))
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/cron/list.php?status=-2');
|
||||
header("Location: ".DOL_URL_ROOT.'/cron/list.php');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -93,7 +93,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->cron->del
|
||||
}
|
||||
else
|
||||
{
|
||||
Header("Location: ".DOL_URL_ROOT.'/cron/list.php?status=-2');
|
||||
Header("Location: ".DOL_URL_ROOT.'/cron/list.php');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -557,7 +557,7 @@ else
|
||||
|
||||
dol_fiche_head($head, 'card', $langs->trans("CronTask"), -1, 'cron');
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?status=-2&restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
$morehtmlref.='</div>';
|
||||
|
||||
@ -50,7 +50,7 @@ $head = cron_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'info', $langs->trans("CronTask"), -1, 'cron');
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?status=-2&restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
$morehtmlref.='</div>';
|
||||
|
||||
@ -56,7 +56,6 @@ if (! $sortfield) $sortfield='t.status,t.priority';
|
||||
if (! $sortorder) $sortorder='DESC,ASC';
|
||||
|
||||
$search_status=GETPOST('search_status', 'int')?GETPOST('search_status', 'int'):GETPOST('status', 'int');
|
||||
if ($search_status == '') $search_status=-2;
|
||||
|
||||
//Search criteria
|
||||
$search_label=GETPOST("search_label", 'alpha');
|
||||
@ -253,7 +252,6 @@ $sql.= " t.test";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."cronjob as t";
|
||||
$sql.= " WHERE entity IN (0,".$conf->entity.")";
|
||||
if ($search_status >= 0 && $search_status < 2) $sql.= " AND t.status = ".(empty($search_status)?'0':'1');
|
||||
if ($search_status == 2) $sql.= " AND t.status = 2";
|
||||
//Manage filter
|
||||
if (is_array($filter) && count($filter)>0) {
|
||||
foreach($filter as $key => $value) {
|
||||
|
||||
@ -2737,7 +2737,7 @@ elseif (! empty($module))
|
||||
|
||||
if ($action != 'editfile' || empty($file))
|
||||
{
|
||||
print '<span class="opacitymedium">'.$langs->trans("CronJobDefDesc", '<a href="'.DOL_URL_ROOT.'/cron/list.php?status=-2">'.$langs->transnoentities('CronList').'</a>').'</span><br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("CronJobDefDesc", '<a href="'.DOL_URL_ROOT.'/cron/list.php">'.$langs->transnoentities('CronList').'</a>').'</span><br>';
|
||||
print '<br>';
|
||||
|
||||
print '<span class="fa fa-file-o"></span> '.$langs->trans("DescriptorFile").' : <strong>'.$pathtofile.'</strong>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user