FIX #yogosha4456
This commit is contained in:
parent
8029b80f08
commit
16b9e62866
@ -219,10 +219,10 @@ $dolibarr_main_authentication='dolibarr';
|
|||||||
// 1 = Force redirect to https, until SCRIPT_URI start with https into response
|
// 1 = Force redirect to https, until SCRIPT_URI start with https into response
|
||||||
// 2 = Force redirect to https, until SERVER["HTTPS"] is 'on' into response
|
// 2 = Force redirect to https, until SERVER["HTTPS"] is 'on' into response
|
||||||
// 'https://my.domain.com' = Force redirect to https using this domain name.
|
// 'https://my.domain.com' = Force redirect to https using this domain name.
|
||||||
// Warning: If you enable this parameter, your web server must be configured to
|
// Warning: If you enable this parameter, your web server must be configured to respond URL with https protocol.
|
||||||
// respond URL with https protocol.
|
// According to your web server setup, some values may works and other not. Try different values (1,2 or 'https://my.domain.com') if you experience problems.
|
||||||
// According to your web server setup, some values may works and other not. Try
|
// Even if a redirect to HTTPS is forced by the webserver, it is recommanded to set this value to another value than 0, so your session cookies will be
|
||||||
// different values (1,2 or 'https://my.domain.com') if you experience problems.
|
// flagged as secured.
|
||||||
// Default value: 0
|
// Default value: 0
|
||||||
// Possible values: 0, 1, 2 or 'https://my.domain.com'
|
// Possible values: 0, 1, 2 or 'https://my.domain.com'
|
||||||
// Examples:
|
// Examples:
|
||||||
@ -233,12 +233,12 @@ $dolibarr_main_force_https='0';
|
|||||||
// dolibarr_main_prod
|
// dolibarr_main_prod
|
||||||
// When this parameter is defined, all errors messages are not reported.
|
// When this parameter is defined, all errors messages are not reported.
|
||||||
// This feature exists for production usage to avoid to give any information to hackers.
|
// This feature exists for production usage to avoid to give any information to hackers.
|
||||||
// Default value: 0
|
// Default value: 1
|
||||||
// Possible values: 0 or 1
|
// Possible values: 0 or 1
|
||||||
// Examples:
|
// Examples:
|
||||||
// $dolibarr_main_prod='0';
|
// $dolibarr_main_prod='1';
|
||||||
//
|
//
|
||||||
$dolibarr_main_prod='0';
|
$dolibarr_main_prod='1';
|
||||||
|
|
||||||
// $dolibarr_main_restrict_os_commands
|
// $dolibarr_main_restrict_os_commands
|
||||||
// To restrict commands you can execute by the backup feature, enter allowed command here.
|
// To restrict commands you can execute by the backup feature, enter allowed command here.
|
||||||
@ -260,8 +260,8 @@ $dolibarr_main_restrict_ip='';
|
|||||||
|
|
||||||
// dolibarr_nocsrfcheck
|
// dolibarr_nocsrfcheck
|
||||||
// This parameter can be used to disable CSRF protection.
|
// This parameter can be used to disable CSRF protection.
|
||||||
// This might be required if you access Dolibarr behind a proxy that make
|
// This might be required if you access Dolibarr behind a proxy that make bad URL rewriting, to avoid false alarms.
|
||||||
// URL rewriting, to avoid false alarms.
|
// In most cases, you should always keep this to 0.
|
||||||
// Default value: 0
|
// Default value: 0
|
||||||
// Possible values: 0 or 1
|
// Possible values: 0 or 1
|
||||||
// Examples:
|
// Examples:
|
||||||
@ -269,6 +269,12 @@ $dolibarr_main_restrict_ip='';
|
|||||||
//
|
//
|
||||||
$dolibarr_nocsrfcheck='0';
|
$dolibarr_nocsrfcheck='0';
|
||||||
|
|
||||||
|
// dolibarr_cron_allow_cli
|
||||||
|
// If set to 1, you will be able to define some command line in the internale Job scheduler module.
|
||||||
|
// Default value: '0'
|
||||||
|
// Examples: '1'
|
||||||
|
$dolibarr_cron_allow_cli='0';
|
||||||
|
|
||||||
// dolibarr_mailing_limit_sendbyweb
|
// dolibarr_mailing_limit_sendbyweb
|
||||||
// Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level.
|
// Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level.
|
||||||
// Default value: '25'
|
// Default value: '25'
|
||||||
|
|||||||
@ -1119,23 +1119,32 @@ class Cronjob extends CommonObject
|
|||||||
// Run a command line
|
// Run a command line
|
||||||
if ($this->jobtype == 'command')
|
if ($this->jobtype == 'command')
|
||||||
{
|
{
|
||||||
$outputdir = $conf->cron->dir_temp;
|
global $dolibarr_cron_allow_cli;
|
||||||
if (empty($outputdir)) $outputdir = $conf->cronjob->dir_temp;
|
|
||||||
|
|
||||||
if (!empty($outputdir))
|
if (empty($dolibarr_cron_allow_cli)) {
|
||||||
{
|
$langs->load("errors");
|
||||||
dol_mkdir($outputdir);
|
$this->error = $langs->trans("FailedToExecutCommandJob");
|
||||||
$outputfile = $outputdir.'/cronjob.'.$userlogin.'.out'; // File used with popen method
|
$this->lastoutput = '';
|
||||||
|
$this->lastresult = $langs->trans("ErrorParameterMustBeEnabledToAllwoThisFeature", 'dolibarr_cron_allow_cli');
|
||||||
|
} else {
|
||||||
|
$outputdir = $conf->cron->dir_temp;
|
||||||
|
if (empty($outputdir)) $outputdir = $conf->cronjob->dir_temp;
|
||||||
|
|
||||||
// Execute a CLI
|
if (!empty($outputdir))
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php';
|
{
|
||||||
$utils = new Utils($this->db);
|
dol_mkdir($outputdir);
|
||||||
$arrayresult = $utils->executeCLI($this->command, $outputfile);
|
$outputfile = $outputdir.'/cronjob.'.$userlogin.'.out'; // File used with popen method
|
||||||
|
|
||||||
$retval = $arrayresult['result'];
|
// Execute a CLI
|
||||||
$this->error = $arrayresult['error'];
|
include_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php';
|
||||||
$this->lastoutput = $arrayresult['output'];
|
$utils = new Utils($this->db);
|
||||||
$this->lastresult = $arrayresult['result'];
|
$arrayresult = $utils->executeCLI($this->command, $outputfile);
|
||||||
|
|
||||||
|
$retval = $arrayresult['result'];
|
||||||
|
$this->error = $arrayresult['error'];
|
||||||
|
$this->lastoutput = $arrayresult['output'];
|
||||||
|
$this->lastresult = $arrayresult['result'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -243,6 +243,7 @@ ErrorReplaceStringEmpty=Error, the string to replace into is empty
|
|||||||
ErrorProductNeedBatchNumber=Error, product '<b>%s</b>' need a lot/serial number
|
ErrorProductNeedBatchNumber=Error, product '<b>%s</b>' need a lot/serial number
|
||||||
ErrorProductDoesNotNeedBatchNumber=Error, product '<b>%s</b>' does not accept a lot/serial number
|
ErrorProductDoesNotNeedBatchNumber=Error, product '<b>%s</b>' does not accept a lot/serial number
|
||||||
ErrorFailedToReadObject=Error, failed to read object of type <b>%s</b>
|
ErrorFailedToReadObject=Error, failed to read object of type <b>%s</b>
|
||||||
|
ErrorParameterMustBeEnabledToAllwoThisFeature=Error, parameter <b>%s</b> must be enabled into <b>conf/conf.php<b> to allow use of Command Line Interface by the internal job scheduler
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
|
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
|
||||||
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
|
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user