Fix #yogosha16184
This commit is contained in:
parent
6b942aed6f
commit
155c52bc30
@ -173,7 +173,7 @@ print '<br>';
|
|||||||
print '<strong>'.$langs->trans("XDebug").'</strong>: ';
|
print '<strong>'.$langs->trans("XDebug").'</strong>: ';
|
||||||
$test = !function_exists('xdebug_is_enabled') && !extension_loaded('xdebug');
|
$test = !function_exists('xdebug_is_enabled') && !extension_loaded('xdebug');
|
||||||
if ($test) {
|
if ($test) {
|
||||||
print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotRiskOfLeakWithThis");
|
print img_picto('', 'tick').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotRiskOfLeakWithThis");
|
||||||
} else {
|
} else {
|
||||||
print img_picto('', 'warning').' '.$langs->trans("ModuleActivatedMayExposeInformation", $langs->transnoentities("XDebug"));
|
print img_picto('', 'warning').' '.$langs->trans("ModuleActivatedMayExposeInformation", $langs->transnoentities("XDebug"));
|
||||||
print ' - '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php">XDebug admin page</a>';
|
print ' - '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php">XDebug admin page</a>';
|
||||||
@ -480,30 +480,57 @@ print load_fiche_titre($langs->trans("Modules"), '', 'folder');
|
|||||||
|
|
||||||
// Module log
|
// Module log
|
||||||
print '<strong>'.$langs->trans("Syslog").'</strong>: ';
|
print '<strong>'.$langs->trans("Syslog").'</strong>: ';
|
||||||
$test = !isModEnabled('syslog');
|
$test = isModEnabled('syslog');
|
||||||
if ($test) {
|
if (!$test) {
|
||||||
print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotRiskOfLeakWithThis");
|
print img_picto('', 'tick').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotRiskOfLeakWithThis");
|
||||||
} else {
|
} else {
|
||||||
if (getDolGlobalInt('SYSLOG_LEVEL') > LOG_NOTICE) {
|
if (getDolGlobalInt('SYSLOG_LEVEL') > LOG_NOTICE) {
|
||||||
print img_picto('', 'warning').' '.$langs->trans("ModuleActivatedWithTooHighLogLevel", $langs->transnoentities("Syslog"));
|
print img_picto('', 'warning').' '.$langs->trans("ModuleActivatedWithTooHighLogLevel", $langs->transnoentities("Syslog"));
|
||||||
} else {
|
} else {
|
||||||
print img_picto('', 'tick.png').' '.$langs->trans("ModuleSyslogActivatedButLevelNotTooVerbose", $langs->transnoentities("Syslog"), getDolGlobalInt('SYSLOG_LEVEL'));
|
print img_picto('', 'tick').' '.$langs->trans("ModuleSyslogActivatedButLevelNotTooVerbose", $langs->transnoentities("Syslog"), getDolGlobalInt('SYSLOG_LEVEL'));
|
||||||
}
|
}
|
||||||
//print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php'.'">XDebug admin page</a>';
|
//print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php'.'">XDebug admin page</a>';
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
// Module debugbar
|
// Module debugbar
|
||||||
print '<strong>'.$langs->trans("DebugBar").'</strong>: ';
|
print '<strong>'.$langs->trans("DebugBar").'</strong>: ';
|
||||||
$test = empty($conf->debugbar->enabled);
|
$test = isModEnabled('debugbar');
|
||||||
if ($test) {
|
if (!$test) {
|
||||||
print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotRiskOfLeakWithThis");
|
print img_picto('', 'tick').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotRiskOfLeakWithThis");
|
||||||
} else {
|
} else {
|
||||||
print img_picto('', 'error').' '.$langs->trans("ModuleActivatedDoNotUseInProduction", $langs->transnoentities("DebugBar"));
|
print img_picto('', 'error').' '.$langs->trans("ModuleActivatedDoNotUseInProduction", $langs->transnoentities("DebugBar"));
|
||||||
//print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php'.'">XDebug admin page</a>';
|
//print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php'.'">XDebug admin page</a>';
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
// Modules for Payments
|
||||||
|
$test = isModEnabled('stripe');
|
||||||
|
if ($test) {
|
||||||
|
print '<strong>'.$langs->trans("Stripe").'</strong>: ';
|
||||||
|
if (!getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) {
|
||||||
|
print img_picto('', 'error').' '.$langs->trans("OptionXShouldBeEnabledInModuleY", $langs->transnoentities("SecurityTokenIsUnique"), $langs->transnoentities("Stripe"));
|
||||||
|
} else {
|
||||||
|
print img_picto('', 'tick').' '.$langs->trans("OptionXIsCorrectlyEnabledInModuleY", $langs->transnoentities("SecurityTokenIsUnique"), $langs->transnoentities("Stripe"));
|
||||||
|
}
|
||||||
|
print '<br>';
|
||||||
|
} else {
|
||||||
|
$test = isModEnabled('paypal');
|
||||||
|
if ($test) {
|
||||||
|
print '<strong>'.$langs->trans("Paypal").'</strong>: ';
|
||||||
|
if (!getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) {
|
||||||
|
print img_picto('', 'error').' '.$langs->trans("OptionXShouldBeEnabledInModuleY", $langs->transnoentities("SecurityTokenIsUnique"), $langs->transnoentities("Paypal"));
|
||||||
|
} else {
|
||||||
|
print img_picto('', 'tick').' '.$langs->trans("OptionXIsCorrectlyEnabledInModuleY", $langs->transnoentities("SecurityTokenIsUnique"), $langs->transnoentities("Paypal"));
|
||||||
|
}
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// APIs
|
// APIs
|
||||||
|
|
||||||
|
|||||||
@ -572,19 +572,20 @@ function dolJSToSetRandomPassword($htmlname, $htmlnameofbutton = 'generate_token
|
|||||||
if (!empty($conf->use_javascript_ajax)) {
|
if (!empty($conf->use_javascript_ajax)) {
|
||||||
print "\n".'<!-- Js code to suggest a security key -->';
|
print "\n".'<!-- Js code to suggest a security key -->';
|
||||||
print '<script nonce="'.getNonce().'" type="text/javascript">';
|
print '<script nonce="'.getNonce().'" type="text/javascript">';
|
||||||
print '$(document).ready(function () {
|
print 'jQuery(document).ready(function () {
|
||||||
$("#'.dol_escape_js($htmlnameofbutton).'").click(function() {
|
jQuery("#'.dol_escape_js($htmlnameofbutton).'").click(function() {
|
||||||
console.log("We click on the button '.dol_escape_js($htmlnameofbutton).' to suggest a key. We will fill '.dol_escape_js($htmlname).'");
|
var currenttoken = jQuery("meta[name=anti-csrf-currenttoken]").attr("content");
|
||||||
$.get( "'.DOL_URL_ROOT.'/core/ajax/security.php", {
|
console.log("We click on the button '.dol_escape_js($htmlnameofbutton).' to suggest a key. anti-csrf-currentotken is "+currenttoken+". We will fill '.dol_escape_js($htmlname).'");
|
||||||
|
jQuery.get( "'.DOL_URL_ROOT.'/core/ajax/security.php", {
|
||||||
action: \'getrandompassword\',
|
action: \'getrandompassword\',
|
||||||
generic: '.($generic ? '1' : '0').',
|
generic: '.($generic ? '1' : '0').',
|
||||||
token: \''.dol_escape_js(newToken()).'\'
|
token: currenttoken
|
||||||
},
|
},
|
||||||
function(result) {
|
function(result) {
|
||||||
if ($("input#'.dol_escape_js($htmlname).'").attr("type") == "password") {
|
if (jQuery("input#'.dol_escape_js($htmlname).'").attr("type") == "password") {
|
||||||
$("input#'.dol_escape_js($htmlname).'").attr("type", "text");
|
jQuery("input#'.dol_escape_js($htmlname).'").attr("type", "text");
|
||||||
}
|
}
|
||||||
$("#'.dol_escape_js($htmlname).'").val(result);
|
jQuery("#'.dol_escape_js($htmlname).'").val(result);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});'."\n";
|
});'."\n";
|
||||||
|
|||||||
@ -2382,4 +2382,6 @@ MAIN_CHECKBOX_LEFT_COLUMN=Show the column for field and line selection on the le
|
|||||||
NotAvailableByDefaultEnabledOnModuleActivation=Not created by default. Created on module activation only.
|
NotAvailableByDefaultEnabledOnModuleActivation=Not created by default. Created on module activation only.
|
||||||
CSSPage=CSS Style
|
CSSPage=CSS Style
|
||||||
Defaultfortype=Default
|
Defaultfortype=Default
|
||||||
DefaultForTypeDesc=Template used by default when creating a new email for the template type
|
DefaultForTypeDesc=Template used by default when creating a new email for the template type
|
||||||
|
OptionXShouldBeEnabledInModuleY=Option "<b>%s</b>" should be enabled into module <b>%s</b>
|
||||||
|
OptionXIsCorrectlyEnabledInModuleY=Option "<b>%s</b>" is enabled into module <b>%s</b>
|
||||||
|
|||||||
@ -367,7 +367,7 @@ if (!empty($conf->use_javascript_ajax)) {
|
|||||||
print '$(document).ready(function () {
|
print '$(document).ready(function () {
|
||||||
$("#apidoc").hide();
|
$("#apidoc").hide();
|
||||||
$("#apidoca").click(function() {
|
$("#apidoca").click(function() {
|
||||||
console.log("We click on apidoca show/hide");
|
console.log("We click on apidoca so we show/hide");
|
||||||
$("#apidoc").show();
|
$("#apidoc").show();
|
||||||
$("#apidoca").hide();
|
$("#apidoca").hide();
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user