Fix phpcs
This commit is contained in:
parent
2670d4fc17
commit
60016cc3f3
@ -425,7 +425,7 @@ if (!defined('NOTOKENRENEWAL')) {
|
||||
// Check token
|
||||
if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN))
|
||||
|| defined('CSRFCHECK_WITH_TOKEN')) { // Check validity of token, only if option MAIN_SECURITY_CSRF_WITH_TOKEN enabled or if constant CSRFCHECK_WITH_TOKEN is set into page
|
||||
// Check all cases that need a token (all POST actions, all actions and mass actions on pages with CSRFCHECK_WITH_TOKEN set, all sensitive GET actions)
|
||||
// Check all cases that need a token (all POST actions, all actions and mass actions on pages with CSRFCHECK_WITH_TOKEN set, all sensitive GET actions)
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST' ||
|
||||
((GETPOSTISSET('action') || GETPOSTISSET('massaction')) && defined('CSRFCHECK_WITH_TOKEN')) ||
|
||||
in_array(GETPOST('action', 'aZ09'), array('add', 'addtimespent', 'update', 'install', 'delete', 'deletefilter', 'deleteoperation', 'deleteprof', 'deletepayment', 'confirm_create_user', 'confirm_create_thirdparty', 'confirm_reject_check'))) {
|
||||
@ -712,7 +712,7 @@ if (!defined('NOLOGIN')) {
|
||||
|
||||
// End test login / passwords
|
||||
if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success.
|
||||
// No data to test login, so we show the login page.
|
||||
// No data to test login, so we show the login page.
|
||||
dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit");
|
||||
if (defined('NOREDIRECTBYMAINTOLOGIN')) {
|
||||
return 'ERROR_NOT_LOGGED';
|
||||
@ -1051,7 +1051,7 @@ if (!empty($conf->dol_use_jmobile) && in_array($conf->theme, array('bureau2crea'
|
||||
|
||||
if (!defined('NOREQUIRETRAN')) {
|
||||
if (!GETPOST('lang', 'aZ09')) { // If language was not forced on URL
|
||||
// If user has chosen its own language
|
||||
// If user has chosen its own language
|
||||
if (!empty($user->conf->MAIN_LANG_DEFAULT)) {
|
||||
// If different than current language
|
||||
//print ">>>".$langs->getDefaultLang()."-".$user->conf->MAIN_LANG_DEFAULT;
|
||||
@ -3073,7 +3073,7 @@ if (!function_exists("llxFooter")) {
|
||||
if (strpos('alpha', DOL_VERSION) > 0 && !$forceping) {
|
||||
print "\n<!-- NO JS CODE TO ENABLE the anonymous Ping. It is an alpha version -->\n";
|
||||
} elseif (empty($_COOKIE['DOLINSTALLNOPING_'.$hash_unique_id]) || $forceping) { // Cookie is set when we uncheck the checkbox in the installation wizard.
|
||||
// MAIN_LAST_PING_KO_DATE
|
||||
// MAIN_LAST_PING_KO_DATE
|
||||
// Disable ping if MAIN_LAST_PING_KO_DATE is set and is recent
|
||||
if (!empty($conf->global->MAIN_LAST_PING_KO_DATE) && substr($conf->global->MAIN_LAST_PING_KO_DATE, 0, 6) == dol_print_date(dol_now(), '%Y%m') && !$forceping) {
|
||||
print "\n<!-- NO JS CODE TO ENABLE the anonymous Ping. An error already occured this month, we will try later. -->\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user