From f0cdaff9369ba4c8f8edbddcd698bd251e9cbcc4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 13 May 2019 10:26:30 +0200 Subject: [PATCH] Fix status of crons --- htdocs/core/modules/modCron.class.php | 2 +- htdocs/cron/card.php | 6 +++--- htdocs/cron/info.php | 2 +- htdocs/cron/list.php | 2 -- htdocs/modulebuilder/index.php | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/htdocs/core/modules/modCron.class.php b/htdocs/core/modules/modCron.class.php index f07ddeaeaae..ad516e9a787 100644 --- a/htdocs/core/modules/modCron.class.php +++ b/htdocs/core/modules/modCron.class.php @@ -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. diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 0eca0189ab4..fa1e923fd64 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -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 = '' . $langs->trans("BackToList") . ''; + $linkback = '' . $langs->trans("BackToList") . ''; $morehtmlref='
'; $morehtmlref.='
'; diff --git a/htdocs/cron/info.php b/htdocs/cron/info.php index e6c7a0ae7fc..bb00d26dc90 100644 --- a/htdocs/cron/info.php +++ b/htdocs/cron/info.php @@ -50,7 +50,7 @@ $head = cron_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("CronTask"), -1, 'cron'); -$linkback = '' . $langs->trans("BackToList") . ''; +$linkback = '' . $langs->trans("BackToList") . ''; $morehtmlref='
'; $morehtmlref.='
'; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index c6c2d8e154a..de321443a6c 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -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) { diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 0ad297221be..21fb23f017c 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -2737,7 +2737,7 @@ elseif (! empty($module)) if ($action != 'editfile' || empty($file)) { - print ''.$langs->trans("CronJobDefDesc", ''.$langs->transnoentities('CronList').'').'
'; + print ''.$langs->trans("CronJobDefDesc", ''.$langs->transnoentities('CronList').'').'
'; print '
'; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.'';