diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 3680672bc53..e554990892c 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -276,7 +276,7 @@ class Commande extends CommonOrder
if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->creer))
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->order_advance->validate))))
{
- $this->error='ErrorPermissionDenied';
+ $this->error='NotEnoughPermissions';
dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR);
return -1;
}
diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php
index d7a0a57ac37..7141d1df882 100644
--- a/htdocs/core/lib/cron.lib.php
+++ b/htdocs/core/lib/cron.lib.php
@@ -100,10 +100,12 @@ function dol_print_cron_urls()
print img_picto('','object_globe.png').' '.$url."
\n";
print '
';
-
+ $logintouse = 'firstadmin';
+ if ($user->admin) $logintouse = $user->login;
+
print ''.$langs->trans("FileToLaunchCronJobs").':
';
- $file='/scripts/cron/cron_run_jobs.php'.' '.(empty($conf->global->CRON_KEY)?'securitykey':''.$conf->global->CRON_KEY.'').' '.$user->login.' [cronjobid]';
+ $file='/scripts/cron/cron_run_jobs.php'.' '.(empty($conf->global->CRON_KEY)?'securitykey':''.$conf->global->CRON_KEY.'').' '.$logintouse.' [cronjobid]';
print '
\n";
print '
';
@@ -116,7 +118,7 @@ function dol_print_cron_urls()
{
print $langs->trans("CronExplainHowToRunUnix");
print '
';
- print '
';
+ print '
';
}
else
{