2
0
forked from Wavyzz/dolibarr

The tutorial to add cron is sometimes false. Quick hack for a solution

to hide it.
This commit is contained in:
Laurent Destailleur
2017-01-13 16:39:35 +01:00
parent 32a453e8e6
commit 29f07d3e89

View File

@@ -110,21 +110,24 @@ function dol_print_cron_urls()
print '<br>';
// Add note
$linuxlike=1;
if (preg_match('/^win/i',PHP_OS)) $linuxlike=0;
if (preg_match('/^mac/i',PHP_OS)) $linuxlike=0;
print $langs->trans("Note").': ';
if ($linuxlike)
if (empty($conf->global->CRON_DISABLE_TUTORIAL_CRON))
{
print $langs->trans("CronExplainHowToRunUnix");
print '<br>';
print '<textarea class="quatrevingtpercent">*/5 * * * * pathtoscript/scripts/cron/cron_run_jobs.php '.(empty($conf->global->CRON_KEY)?'securitykey':''.$conf->global->CRON_KEY.'').' '.$logintouse.' &gt; '.DOL_DATA_ROOT.'/cron_run_jobs.php.log</textarea><br>';
$linuxlike=1;
if (preg_match('/^win/i',PHP_OS)) $linuxlike=0;
if (preg_match('/^mac/i',PHP_OS)) $linuxlike=0;
print $langs->trans("Note").': ';
if ($linuxlike)
{
print $langs->trans("CronExplainHowToRunUnix");
print '<br>';
print '<textarea class="quatrevingtpercent">*/5 * * * * pathtoscript/scripts/cron/cron_run_jobs.php '.(empty($conf->global->CRON_KEY)?'securitykey':''.$conf->global->CRON_KEY.'').' '.$logintouse.' &gt; '.DOL_DATA_ROOT.'/cron_run_jobs.php.log</textarea><br>';
}
else
{
print $langs->trans("CronExplainHowToRunWin");
}
}
else
{
print $langs->trans("CronExplainHowToRunWin");
}
return 0;
}