diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php
index 7a1d5b66ece..8f20ab43c84 100644
--- a/htdocs/admin/accountant.php
+++ b/htdocs/admin/accountant.php
@@ -114,57 +114,57 @@ print '
| '.$langs->trans(
// Name
print ' |
|---|
| ';
-print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'> |
'."\n";
+print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'>'."\n";
// Address
print ' | ';
-print ' |
'."\n";
+print ''."\n";
print ' | ';
-print ' |
'."\n";
+print ''."\n";
print ' | ';
-print ' |
'."\n";
+print ''."\n";
// Country
print ' | ';
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
-print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id');
+print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY) ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print ' |
'."\n";
print ' | ';
-$formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id');
+$formcompany->select_departement((GETPOSTISSET('state_id') ? GETPOST('state_id', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE) ? $conf->global->MAIN_INFO_ACCOUNTANT_STATE : '')), (GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY) ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'state_id');
print ' |
'."\n";
print ' | ';
print img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright');
-print ' |
';
+print '';
print ''."\n";
print ' | ';
print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright');
-print ' |
';
+print '';
print ''."\n";
print ' | ';
print img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright');
-print ' |
';
+print '';
print ''."\n";
// Web
print ' | ';
print img_picto('', 'globe', '', false, 0, 0, '', 'paddingright');
-print ' |
';
+print '';
print ''."\n";
// Code
print ' | ';
-print ' |
'."\n";
+print ''."\n";
// Note
print ' | ';
-print ' |
';
+print '';
print '';
print '';
diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php
index 63c3350fd9d..404ed12c235 100644
--- a/htdocs/admin/boxes.php
+++ b/htdocs/admin/boxes.php
@@ -446,14 +446,14 @@ print '';
print $langs->trans("MaxNbOfLinesForBoxes");
print ' | '."\n";
print '';
-print '';
+print '';
print ' | ';
print '';
// Activate FileCache - Developement
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || !empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
print '| '.$langs->trans("EnableFileCache").' | ';
- print $form->selectyesno('MAIN_ACTIVATE_FILECACHE', $conf->global->MAIN_ACTIVATE_FILECACHE, 1);
+ print $form->selectyesno('MAIN_ACTIVATE_FILECACHE', (!empty($conf->global->MAIN_ACTIVATE_FILECACHE) ? $conf->global->MAIN_ACTIVATE_FILECACHE : 0), 1);
print ' | ';
print '
';
}
diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
index b82f0fcd765..16f72ef6911 100644
--- a/htdocs/admin/company.php
+++ b/htdocs/admin/company.php
@@ -393,18 +393,18 @@ print '| '.$langs->trans(
// Name
print ' |
|---|
| ';
-print 'global->MAIN_INFO_SOCIETE_NOM) ? ' autofocus="autofocus"' : '').'> |
'."\n";
+print 'global->MAIN_INFO_SOCIETE_NOM) ? ' autofocus="autofocus"' : '')).'>'."\n";
// Address
print ' | ';
-print ' |
'."\n";
+print ''."\n";
// Zip
print ' | ';
-print ' |
'."\n";
+print ''."\n";
print ' | ';
-print ' |
'."\n";
+print ''."\n";
// Country
print ' | ';
@@ -431,25 +431,25 @@ print ' |
'."\n";
// Phone
print ' | ';
print img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright');
-print ' |
';
+print '';
print ''."\n";
// Fax
print ' | ';
print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright');
-print ' |
';
+print '';
print ''."\n";
// Email
print ' | ';
print img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright');
-print ' |
';
+print '';
print ''."\n";
// Web
print ' | ';
print img_picto('', 'globe', '', false, 0, 0, '', 'paddingright');
-print ' |
';
+print '';
print ''."\n";
// Barcode
@@ -457,7 +457,7 @@ if (!empty($conf->barcode->enabled)) {
print '| ';
print ' | ';
print '';
- print ' |
';
+ print '';
print '';
}
@@ -534,7 +534,7 @@ print '';
// Note
print ' | ';
-print ' |
';
+print '';
print '';
print '';
@@ -549,17 +549,17 @@ $langs->load("companies");
// Managing Director(s)
print ' | ';
-print ' |
';
+print '';
// GDPR contact
print '| ';
print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc"));
print ' | ';
-print ' |
';
+print 'global->MAIN_INFO_GDPR) ? $conf->global->MAIN_INFO_GDPR : ''))).'">';
// Capital
print ' | ';
-print ' |
';
+print '';
// Juridical Status
print ' | ';
diff --git a/htdocs/admin/company_socialnetworks.php b/htdocs/admin/company_socialnetworks.php
index 5cbdb948b4a..93c6739d37d 100644
--- a/htdocs/admin/company_socialnetworks.php
+++ b/htdocs/admin/company_socialnetworks.php
@@ -117,11 +117,11 @@ foreach ($listofnetworks as $key => $value) {
$networkconstname = 'MAIN_INFO_SOCIETE_'.strtoupper($key).'_URL';
$networkconstid = 'MAIN_INFO_SOCIETE_'.strtoupper($key);
print ' | ';
- print '';
+ print '';
print ' | ';
- print '';
+ print '';
print ' | ';
- print ''.dol_print_socialnetworks($conf->global->$networkconstid, 0, 0, $key, $listofnetworks).' | ';
+ print ''.dol_print_socialnetworks((!empty($conf->global->$networkconstid) ? dol_escape_htmltag($conf->global->$networkconstid) : ''), 0, 0, $key, $listofnetworks).' | ';
print '
'."\n";
}
}
diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php
index 789762830e3..ae9427d70e0 100644
--- a/htdocs/admin/defaultvalues.php
+++ b/htdocs/admin/defaultvalues.php
@@ -72,9 +72,9 @@ $hookmanager->initHooks(array('admindefaultvalues', 'globaladmin'));
*/
if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; }
-if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; }
+if (!GETPOST('confirmmassaction', 'alpha') && !empty($massaction) && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; }
-$parameters = array('socid'=>$socid);
+$parameters = array();
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@@ -186,7 +186,7 @@ llxHeader('', $langs->trans("Setup"), $wikihelp);
$param = '&mode='.$mode;
-$enabledisablehtml .= $langs->trans("EnableDefaultValues").' ';
+$enabledisablehtml = $langs->trans("EnableDefaultValues").' ';
if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES))
{
// Button off, click to enable
@@ -213,7 +213,7 @@ if ($defaultkey) $param .= '&defaultkey='.urlencode($defaultkey);
if ($defaultvalue) $param .= '&defaultvalue='.urlencode($defaultvalue);
-print '