diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php
index 5d388c35a16..abd85131e29 100644
--- a/htdocs/core/lib/cron.lib.php
+++ b/htdocs/core/lib/cron.lib.php
@@ -1,5 +1,6 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +16,7 @@
* along with this program. If not, see .
*/
/**
- * \file htdocs/jobs/lib/jobs.lib.php
+ * \file cron/lib/cron.lib.php
* \brief Ensemble de fonctions de base pour le module jobs
* \ingroup jobs
*/
@@ -52,12 +53,12 @@ function cron_prepare_head($object)
$h = 0;
$head = array();
- $head[$h][0] = dol_buildpath('/cron/cron/card.php', 1).'?id='.$object->id;
+ $head[$h][0] = dol_buildpath('/cron/card.php', 1).'?id='.$object->id;
$head[$h][1] = $langs->trans("CronTask");
$head[$h][2] = 'card';
$h++;
- $head[$h][0] = dol_buildpath('/cron/cron/info.php', 1).'?id='.$object->id;
+ $head[$h][0] = dol_buildpath('/cron/info.php', 1).'?id='.$object->id;
$head[$h][1] = $langs->trans("CronInfoPage");
$head[$h][2] = 'info';
$h++;
diff --git a/htdocs/core/modules/modCron.class.php b/htdocs/core/modules/modCron.class.php
index 2cf4e9cd9e4..b7bcafc12be 100644
--- a/htdocs/core/modules/modCron.class.php
+++ b/htdocs/core/modules/modCron.class.php
@@ -60,13 +60,13 @@ class modCron extends DolibarrModules
// Config pages
//-------------
- $this->config_page_url = array("cron");
+ $this->config_page_url = array("cron.php@cron");
// Dependancies
//-------------
$this->depends = array();
$this->requiredby = array();
- $this->langfiles = array("cron");
+ $this->langfiles = array("cron@cron");
// Constantes
//-----------
@@ -122,52 +122,27 @@ class modCron extends DolibarrModules
$r=0;
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools', // 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'=>'CronJobs',
- 'url'=>'/cron/index.php',
- 'langs'=>'cron@cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
- 'position'=>100,
- 'leftmenu'=>'cron',
+ 'titre'=>'CronListActive',
+ 'url'=>'/cron/list.php?status=1',
+ 'langs'=>'cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>200,
'enabled'=>'$leftmenu==\'modulesadmintools\'', // 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.
- 'perms'=>'$user->admin', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
+ 'perms'=>'$user->rights->cron->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
$r++;
-
- $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools',
- 'type'=>'left',
- 'titre'=>'CronListActive',
- 'url'=>'/cron/cron/list.php?status=1',
- 'langs'=>'cron@cron',
- 'position'=>201,
- 'enabled'=>'$user->rights->cron->read',
- 'perms'=>'$user->rights->cron->read',
- 'target'=>'',
- 'user'=>2);
- $r++;
-
- $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools',
- 'type'=>'left',
- 'titre'=>'CronListInactive',
- 'url'=>'/cron/cron/list.php?status=0',
- 'langs'=>'cron@cron',
- 'position'=>201,
- 'enabled'=>'$user->rights->cron->read',
- 'perms'=>'$user->rights->cron->read',
- 'target'=>'',
- 'user'=>2);
- $r++;
-
- $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools',
- 'type'=>'left',
- 'titre'=>'CronAdd',
- 'url'=>'/cron/cron/card.php?action=create',
- 'langs'=>'cron@cron',
- 'position'=>202,
- 'enabled'=>'$user->rights->cron->create',
- 'perms'=>'$user->rights->cron->create',
- 'target'=>'',
- 'user'=>2);
- $r++;
+
+ $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools', // 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'=>'CronListInactive',
+ 'url'=>'/cron/list.php?status=0',
+ 'langs'=>'cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>201,
+ 'enabled'=>'$leftmenu==\'modulesadmintools\'', // 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.
+ 'perms'=>'$user->rights->cron->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
+ 'target'=>'',
+ 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
+ $r++;
}
diff --git a/htdocs/cron/admin/cron.php b/htdocs/cron/admin/cron.php
index 238208035f3..894e9dc4457 100644
--- a/htdocs/cron/admin/cron.php
+++ b/htdocs/cron/admin/cron.php
@@ -106,10 +106,10 @@ print '
';
// Cron launch
print ''.$langs->trans("URLToLaunchCronJobs").':
';
-$url=dol_buildpath('/cron/public/cron/cron_run_jobs.php',1).(empty($conf->global->MAIN_CRON_KEY)?'':'?securitykey='.$conf->global->MAIN_CRON_KEY.'&').'userlogin='.$user->login;
+$url=dol_buildpath('/public/cron/cron_run_jobs.php',1).(empty($conf->global->MAIN_CRON_KEY)?'':'?securitykey='.$conf->global->MAIN_CRON_KEY.'&').'userlogin='.$user->login;
print img_picto('','object_globe.png').' '.$url."
\n";
print ' '.$langs->trans("OrToLaunchASpecificJob").'
';
-$url=dol_buildpath('/cron/public/cron/cron_run_jobs.php',1).(empty($conf->global->MAIN_CRON_KEY)?'':'?securitykey='.$conf->global->MAIN_CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid';
+$url=dol_buildpath('/public/cron/cron_run_jobs.php',1).(empty($conf->global->MAIN_CRON_KEY)?'':'?securitykey='.$conf->global->MAIN_CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid';
print img_picto('','object_globe.png').' '.$url."
\n";
print '
';
print '
';
@@ -126,11 +126,11 @@ if ($linuxlike) {
}
print '
';
print ''.$langs->trans("FileToLaunchCronJobs").':
';
-$file=dol_buildpath('/cron/script/cron/cron_run_jobs.php').' '.(empty($conf->global->MAIN_CRON_KEY)?'securitykey':''.$conf->global->MAIN_CRON_KEY.'').' '.$user->login.' cronjobid(optionnal)';
+$file='/scripts/cron/cron_run_jobs.php'.' '.(empty($conf->global->MAIN_CRON_KEY)?'securitykey':''.$conf->global->MAIN_CRON_KEY.'').' '.$user->login.' cronjobid(optionnal)';
if ($linuxlike) {
- print 'user@host:'.DOL_DOCUMENT_ROOT.'$ php '.$file."
\n";
+ print 'user@host:'.DOL_DOCUMENT_ROOT.'$ php ..'.$file."
\n";
} else {
- print DOL_DOCUMENT_ROOT.'> php '.$file."
\n";
+ print DOL_DOCUMENT_ROOT.'> php ..'.$file."
\n";
}
print '
';
diff --git a/htdocs/cron/info.php b/htdocs/cron/info.php
index b5b9c6d29dc..55c294d54ed 100644
--- a/htdocs/cron/info.php
+++ b/htdocs/cron/info.php
@@ -47,7 +47,7 @@ $object->info($id);
$head = cron_prepare_head($object);
-dol_fiche_head($head, 'info', $langs->trans("CronInfo"), 0, 'bill');
+dol_fiche_head($head, 'info', $langs->trans("CronTask"), 0, 'bill');
print '
| ';
dol_print_object_info($object);
diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php
index 2d472add564..5e972f0e55b 100644
--- a/htdocs/cron/list.php
+++ b/htdocs/cron/list.php
@@ -283,7 +283,13 @@ if (count($object->lines)>0) {
print $langs->trans('CronNoJobs');
}
-print '';
+print "\n\n';
llxFooter();
$db->close();
\ No newline at end of file
diff --git a/htdocs/install/mysql/tables/llx_cronjob.sql b/htdocs/install/mysql/tables/llx_cronjob.sql
index 959a3a1705d..a5bb3c10f59 100644
--- a/htdocs/install/mysql/tables/llx_cronjob.sql
+++ b/htdocs/install/mysql/tables/llx_cronjob.sql
@@ -18,7 +18,7 @@
-- ===================================================================
-CREATE TABLE IF NOT EXISTS llx_cronjob
+CREATE TABLE llx_cronjob
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
|