';
if (empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) {
- print '
'.$langs->trans("LockNewSessions").'';
+ print '
'.$langs->trans("LockNewSessions").'';
} else {
- print '
'.$langs->trans("UnlockNewSessions").'';
+ print '
'.$langs->trans("UnlockNewSessions").'';
}
if ($savehandler == 'files') {
if (count($listofsessions)) {
- print '
'.$langs->trans("PurgeSessions").'';
+ print '
'.$langs->trans("PurgeSessions").'';
}
}
diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php
index e20b9c2b13a..09647549c8b 100644
--- a/htdocs/admin/tools/purge.php
+++ b/htdocs/admin/tools/purge.php
@@ -21,15 +21,15 @@
* \brief Page to purge files (temporary or not)
*/
+if (! defined('CSRFCHECK_WITH_TOKEN')) {
+ define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
+}
+
require '../../main.inc.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$langs->load("admin");
-if (!$user->admin) {
- accessforbidden();
-}
-
$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$choice = GETPOST('choice', 'aZ09');
@@ -42,10 +42,15 @@ if (!empty($conf->syslog->enabled)) {
$filelog = preg_replace('/DOL_DATA_ROOT/i', DOL_DATA_ROOT, $filelog);
}
+if (!$user->admin) {
+ accessforbidden();
+}
+
/*
* Actions
*/
+
if ($action == 'purge' && !preg_match('/^confirm/i', $choice) && ($choice != 'allfiles' || $confirm == 'yes')) {
// Increase limit of time. Works only if we are not in safe mode
$ExecTimeLimit = 600;
diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php
index 5a6ff94ce57..821bcd9e3f3 100644
--- a/htdocs/admin/tools/update.php
+++ b/htdocs/admin/tools/update.php
@@ -22,6 +22,10 @@
* \brief Page to make a Dolibarr online upgrade
*/
+if (! defined('CSRFCHECK_WITH_TOKEN')) {
+ define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
+}
+
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -100,7 +104,7 @@ if (function_exists('curl_init')) {
print $langs->trans("LastStableVersion").' :
'.$langs->trans("UpdateServerOffline").'';
}
} else {
- print $langs->trans("LastStableVersion").' :
'.$langs->trans("Check").'';
+ print $langs->trans("LastStableVersion").' :
'.$langs->trans("Check").'';
}
}
@@ -113,14 +117,14 @@ print '
';
print $langs->trans("ThisIsProcessToFollow").'
';
print '
'.$langs->trans("StepNb", 1).': ';
$fullurl = '
'.$urldolibarr.'';
-print $langs->trans("DownloadPackageFromWebSite", $fullurl).'
';
+print str_replace('{s}', $fullurl, $langs->trans("DownloadPackageFromWebSite", '{s}')).'
';
print '
'.$langs->trans("StepNb", 2).': ';
-print $langs->trans("UnpackPackageInDolibarrRoot", $dolibarrroot).'
';
+print str_replace('{s}', $dolibarrroot, $langs->trans("UnpackPackageInDolibarrRoot", '{s}')).'
';
print '
'.$langs->trans("StepNb", 3).': ';
print $langs->trans("RemoveLock", $dolibarrdataroot.'/install.lock').'
';
print '
'.$langs->trans("StepNb", 4).': ';
$fullurl = '
'.DOL_URL_ROOT.'/install/';
-print $langs->trans("CallUpdatePage", $fullurl).'
';
+print str_replace('{s}', $fullurl, $langs->trans("CallUpdatePage", '{s}')).'
';
print '
'.$langs->trans("StepNb", 5).': ';
print $langs->trans("RestoreLock", $dolibarrdataroot.'/install.lock').'
';
@@ -133,8 +137,9 @@ print '
';
print $langs->trans("AddExtensionThemeModuleOrOther").'
';
print '
';
-
-print $langs->trans("GoModuleSetupArea", DOL_URL_ROOT.'/admin/modules.php?mode=deploy', $langs->transnoentities("Home").' - '.$langs->transnoentities("Setup").' - '.$langs->transnoentities("Modules"));
+$texttoshow = $langs->trans("GoModuleSetupArea", DOL_URL_ROOT.'/admin/modules.php?mode=deploy', '{s2}');
+$texttoshow = str_replace('{s2}', img_picto('', 'tools', 'class="pictofixedwidth"').$langs->transnoentities("Home").' - '.$langs->transnoentities("Setup").' - '.$langs->transnoentities("Modules"), $texttoshow);
+print $texttoshow;
// End of page
llxFooter();
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 333d4e2ded6..65b446727e5 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -195,7 +195,7 @@ class Commande extends CommonOrder
/**
* @var int Date expected for delivery
- * @see delivery_date
+ * @see $delivery_date
* @deprecated
*/
public $date_livraison;
diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php
index ea9f7799849..d1cc0413bfd 100644
--- a/htdocs/compta/bank/card.php
+++ b/htdocs/compta/bank/card.php
@@ -212,7 +212,7 @@ if (empty($reshook)) {
$object->ics = trim(GETPOST("ics", 'alpha'));
$object->ics_transfer = trim(GETPOST("ics_transfer", 'alpha'));
- $account_number = GETPOST('account_number', 'alpha');
+ $account_number = GETPOST('account_number', 'alphanohtml');
if (empty($account_number) || $account_number == '-1') {
$object->account_number = '';
} else {
@@ -754,13 +754,13 @@ if ($action == 'create') {
print '