';
if ($row[0] == 'tobind') {
- print $langs->trans("Unknown");
+ print ''.$langs->trans("Unknown").' ';
} else {
print length_accountg($row[0]);
}
@@ -349,8 +349,8 @@ print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '',
print '';
print '
';
-print ''.$langs->trans("Account").' ';
-print ''.$langs->trans("Label").' ';
+print ''.$langs->trans("Account").' ';
+print ''.$langs->trans("Label").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
@@ -436,7 +436,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
print '';
print '
';
- print ''.$langs->trans("TotalVente").' ';
+ print ''.$langs->trans("TotalVente").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
@@ -497,7 +497,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
print " \n";
print '';
print '
';
- print ''.$langs->trans("TotalMarge").' ';
+ print ''.$langs->trans("TotalMarge").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php
index f06dd5f8d6f..0e3bda39521 100644
--- a/htdocs/accountancy/expensereport/index.php
+++ b/htdocs/accountancy/expensereport/index.php
@@ -154,8 +154,8 @@ print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '',
print '';
print '
';
-print ''.$langs->trans("Account").' ';
-print ''.$langs->trans("Label").' ';
+print ''.$langs->trans("Account").' ';
+print ''.$langs->trans("Label").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
@@ -197,7 +197,7 @@ if ($resql) {
while ($row = $db->fetch_row($resql)) {
print '';
if ($row[0] == 'tobind') {
- print $langs->trans("Unknown");
+ print ''.$langs->trans("Unknown").' ';
} else {
print length_accountg($row[0]);
}
@@ -233,8 +233,8 @@ print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '',
print '';
print '
';
-print ''.$langs->trans("Account").' ';
-print ''.$langs->trans("Label").' ';
+print ''.$langs->trans("Account").' ';
+print ''.$langs->trans("Label").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
@@ -276,7 +276,7 @@ if ($resql) {
while ($row = $db->fetch_row($resql)) {
print '';
if ($row[0] == 'tobind') {
- print $langs->trans("Unknown");
+ print ''.$langs->trans("Unknown").' ';
} else {
print length_accountg($row[0]);
}
@@ -314,7 +314,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
print '';
print '
';
- print ''.$langs->trans("Total").' ';
+ print ''.$langs->trans("Total").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php
index f047ddf70de..585121f7c36 100644
--- a/htdocs/accountancy/supplier/index.php
+++ b/htdocs/accountancy/supplier/index.php
@@ -265,8 +265,8 @@ print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '',
print '';
print '
';
-print ''.$langs->trans("Account").' ';
-print ''.$langs->trans("Label").' ';
+print ''.$langs->trans("Account").' ';
+print ''.$langs->trans("Label").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
@@ -309,7 +309,7 @@ if ($resql) {
while ($row = $db->fetch_row($resql)) {
print '';
if ($row[0] == 'tobind') {
- print $langs->trans("Unknown");
+ print ''.$langs->trans("Unknown").' ';
} else {
print length_accountg($row[0]);
}
@@ -344,8 +344,8 @@ print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '',
print '';
print '
';
-print ''.$langs->trans("Account").' ';
-print ''.$langs->trans("Label").' ';
+print ''.$langs->trans("Account").' ';
+print ''.$langs->trans("Label").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
@@ -425,7 +425,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
print '';
print '
';
- print ''.$langs->trans("Total").' ';
+ print ''.$langs->trans("Total").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index 4fd16df2afe..90e44617b05 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -620,10 +620,12 @@ if ($result) {
}
// Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
- if (!empty($objp->company_code_buy)) {
- $objp->code_buy_t = $objp->company_code_buy;
- $objp->aarowid_suggest = $objp->aarowid_thirdparty;
- $suggestedaccountingaccountfor = '';
+ if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
+ if (!empty($objp->company_code_buy)) {
+ $objp->code_buy_t = $objp->company_code_buy;
+ $objp->aarowid_suggest = $objp->aarowid_thirdparty;
+ $suggestedaccountingaccountfor = '';
+ }
}
if (!empty($objp->code_buy_p)) {
@@ -724,11 +726,13 @@ if ($result) {
$s .= $langs->trans("NotDefined");
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
}
- print ' ';
- $s = '3. '.(($objp->type_l == 1) ? $langs->trans("ServiceForThisThirdparty") : $langs->trans("ProductForThisThirdparty")).': ';
- $shelp = '';
- $s .= ($objp->code_buy_t > 0 ? length_accountg($objp->code_buy_t) : ''.$langs->trans("NotDefined").' ');
- print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
+ if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
+ print ' ';
+ $s = '3. '.(($objp->type_l == 1) ? $langs->trans("ServiceForThisThirdparty") : $langs->trans("ProductForThisThirdparty")).': ';
+ $shelp = '';
+ $s .= ($objp->code_buy_t > 0 ? length_accountg($objp->code_buy_t) : ''.$langs->trans("NotDefined").' ');
+ print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
+ }
print '';
// Suggested accounting account
diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php
index 5a589756feb..018498c2457 100644
--- a/htdocs/adherents/admin/member.php
+++ b/htdocs/adherents/admin/member.php
@@ -25,7 +25,7 @@
*/
/**
- * \file htdocs/adherents/admin/adherent.php
+ * \file htdocs/adherents/admin/member.php
* \ingroup member
* \brief Page to setup the module Foundation
*/
diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php
index bfcb751f9a9..5e7a229fee3 100644
--- a/htdocs/admin/dolistore/class/dolistore.class.php
+++ b/htdocs/admin/dolistore/class/dolistore.class.php
@@ -217,15 +217,15 @@ class Dolistore
for ($i = 0; $i < $nbofcateg; $i++) {
$cat = $this->categories[$i];
if ($cat->is_root_category == 1 && $parent == 0) {
- $html .= '';
+ $html .= ' ';
$html .= self::get_categories($cat->id);
$html .= " \n";
} elseif (trim($cat->id_parent) == $parent && $cat->active == 1 && trim($cat->id_parent) != 0) { // si cat est de ce niveau
$select = ($cat->id == $this->categorie) ? ' selected' : '';
- $html .= 'description->language[$this->lang - 1])).'" ';
- $html .= '>'.$cat->name->language[$this->lang - 1].' '.$cat->nb_products_recursive.' ';
+ $html .= '>'.dol_escape_htmltag($cat->name->language[$this->lang - 1]).' '.dol_escape_htmltag($cat->nb_products_recursive).' ';
$html .= self::get_categories($cat->id);
$html .= " \n";
}
@@ -267,9 +267,9 @@ class Dolistore
// add image or default ?
if ($product->id_default_image != '') {
- $image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image;
- $images = '';
- $images .= ' ';
+ $image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.((int) $product->id).'&id_image='.((int) $product->id_default_image);
+ $images = '';
+ $images .= ' ';
} else {
$images = ' ';
}
@@ -277,11 +277,11 @@ class Dolistore
// free or pay ?
if ($product->price > 0) {
$price = ''.price(price2num($product->price, 'MT'), 0, $langs, 1, -1, -1, 'EUR').' '.$langs->trans("HT").' ';
- $download_link = ' ';
+ $download_link = ' ';
} else {
$price = ''.$langs->trans('Free').' ';
- $download_link = ' ';
- $download_link .= ' ';
+ $download_link = ' ';
+ $download_link .= ' ';
}
//checking versions
@@ -319,14 +319,14 @@ class Dolistore
//.''.$langs->trans("SeeInMarkerPlace").'
//output template
- $html .= '
- '.$newapp.$images.'
- '.$product->name->language[$this->lang - 1]
- .''.$version.'
- '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.' '.$product->description_short->language[$this->lang - 1].' ';
+ $html .= '
+ '.dol_escape_htmltag($newapp.$images).'
+ '.dol_escape_htmltag($product->name->language[$this->lang - 1])
+ .''.dol_escape_htmltag($version).'
+ '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.dol_escape_htmltag($product->reference).' - '.dol_escape_htmltag($langs->trans('Id')).': '.((int) $product->id).' '.dol_escape_htmltag($product->description_short->language[$this->lang - 1]).' ';
// do not load if display none
//$html .= ''.$product->description->language[$this->lang - 1].' ';
- $html .= ''.$price.' ';
+ $html .= ''.dol_escape_htmltag($price).' ';
$html .= ''.$download_link.' ';
$html .= ' ';
}
@@ -343,7 +343,7 @@ class Dolistore
public function get_previous_link($text = '<<')
{
// phpcs:enable
- return ''.$text.' ';
+ return ''.dol_escape_htmltag($text).' ';
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
@@ -356,7 +356,7 @@ class Dolistore
public function get_next_link($text = '>>')
{
// phpcs:enable
- return ''.$text.' ';
+ return ''.dol_escape_htmltag($text).' ';
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php
index 3388b649a67..d3c142b8e99 100644
--- a/htdocs/admin/fckeditor.php
+++ b/htdocs/admin/fckeditor.php
@@ -47,6 +47,8 @@ if (!$user->admin) {
// Constant and translation of the module description
$modules = array(
+ 'NOTE_PUBLIC' => 'FCKeditorForNotePublic',
+ 'NOTE_PRIVATE' => 'FCKeditorForNotePrivate',
'SOCIETE' => 'FCKeditorForCompany',
'PRODUCTDESC' => 'FCKeditorForProduct',
'DETAILS' => 'FCKeditorForProductDetails',
@@ -54,11 +56,11 @@ $modules = array(
'MAILING' => 'FCKeditorForMailing',
'MAIL' => 'FCKeditorForMail',
'TICKET' => 'FCKeditorForTicket',
- 'NOTE_PUBLIC' => 'FCKeditorForNotePublic',
- 'NOTE_PRIVATE' => 'FCKeditorForNotePrivate',
);
// Conditions for the option to be offered
$conditions = array(
+ 'NOTE_PUBLIC' => 1,
+ 'NOTE_PRIVATE' => 1,
'SOCIETE' => 1,
'PRODUCTDESC' => (!empty($conf->product->enabled) || !empty($conf->service->enabled)),
'DETAILS' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->supplier_proposal->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)),
@@ -66,11 +68,11 @@ $conditions = array(
'MAILING' => !empty($conf->mailing->enabled),
'MAIL' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled)),
'TICKET' => !empty($conf->ticket->enabled),
- 'NOTE_PUBLIC' => 1,
- 'NOTE_PRIVATE' => 1,
);
// Picto
$picto = array(
+ 'NOTE_PUBLIC' => 'generic',
+ 'NOTE_PRIVATE' => 'generic',
'SOCIETE' => 'generic',
'PRODUCTDESC' => 'product',
'DETAILS' => 'product',
@@ -78,8 +80,6 @@ $picto = array(
'MAILING' => 'email',
'MAIL' => 'email',
'TICKET' => 'ticket',
- 'NOTE_PUBLIC' => 'generic',
- 'NOTE_PRIVATE' => 'generic',
);
diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php
index 26f0c28172f..b606a986ba2 100644
--- a/htdocs/admin/ldap.php
+++ b/htdocs/admin/ldap.php
@@ -43,6 +43,7 @@ $action = GETPOST('action', 'aZ09');
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('adminldap', 'globaladmin'));
+
/*
* Actions
*/
@@ -150,7 +151,7 @@ $arraylist['0'] = $langs->trans("No");
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr");
$arraylist['dolibarr2ldap'] = $langs->trans("DolibarrToLDAP");
print $form->selectarray('activesynchro', $arraylist, $conf->global->LDAP_SYNCHRO_ACTIVE);
-print ''.$langs->trans("LDAPDnSynchroActiveExample");
+print ' '.$langs->trans("LDAPDnSynchroActiveExample").' ';
if ($conf->global->LDAP_SYNCHRO_ACTIVE && !$conf->global->LDAP_USER_DN) {
print ''.$langs->trans("LDAPSetupNotComplete").' ';
}
@@ -163,7 +164,7 @@ if (!empty($conf->societe->enabled)) {
$arraylist['0'] = $langs->trans("No");
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
print $form->selectarray('activecontact', $arraylist, $conf->global->LDAP_CONTACT_ACTIVE);
- print ''.$langs->trans("LDAPDnContactActiveExample").' ';
+ print ''.$langs->trans("LDAPDnContactActiveExample").' ';
}
// Synchro member active
@@ -174,7 +175,7 @@ if (!empty($conf->adherent->enabled)) {
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr").' ('.$langs->trans("SupportedForLDAPImportScriptOnly").')';
print $form->selectarray('activemembers', $arraylist, $conf->global->LDAP_MEMBER_ACTIVE);
- print ''.$langs->trans("LDAPDnMemberActiveExample").' ';
+ print ''.$langs->trans("LDAPDnMemberActiveExample").' ';
}
// Synchro member type active
@@ -185,7 +186,7 @@ if (!empty($conf->adherent->enabled)) {
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr").' ('.$langs->trans("SupportedForLDAPImportScriptOnly").')';
print $form->selectarray('activememberstypes', $arraylist, $conf->global->LDAP_MEMBER_TYPE_ACTIVE);
- print ''.$langs->trans("LDAPDnMemberTypeActiveExample").' ';
+ print ''.$langs->trans("LDAPDnMemberTypeActiveExample").' ';
}
// Fields from hook
@@ -214,33 +215,33 @@ $arraylist = array();
$arraylist['3'] = 'Version 3';
$arraylist['2'] = 'Version 2';
print $form->selectarray('LDAP_SERVER_PROTOCOLVERSION', $arraylist, $conf->global->LDAP_SERVER_PROTOCOLVERSION);
-print ''.$langs->trans("LDAPServerProtocolVersion").' ';
+print ''.$langs->trans("LDAPServerProtocolVersion").' ';
// Serveur primaire
print '';
print $langs->trans("LDAPPrimaryServer").' ';
-print ' ';
-print ' '.$langs->trans("LDAPServerExample").' ';
+print ' ';
+print ''.$langs->trans("LDAPServerExample").' ';
// Serveur secondaire
print '';
print $langs->trans("LDAPSecondaryServer").' ';
-print ' ';
-print ' '.$langs->trans("LDAPServerExample").' ';
+print ' ';
+print ''.$langs->trans("LDAPServerExample").' ';
// Port
print ''.$langs->trans("LDAPServerPort").' ';
if (!empty($conf->global->LDAP_SERVER_PORT)) {
- print ' ';
+ print ' ';
} else {
- print ' ';
+ print ' ';
}
-print ' '.$langs->trans("LDAPServerPortExample").' ';
+print ''.$langs->trans("LDAPServerPortExample").' ';
// DNserver
print ''.$langs->trans("LDAPServerDn").' ';
-print ' ';
-print ' '.$langs->trans("LDAPServerDnExample").' ';
+print ' ';
+print ''.$langs->trans("LDAPServerDnExample").' ';
// Utiliser TLS
print ''.$langs->trans("LDAPServerUseTLS").' ';
@@ -248,7 +249,7 @@ $arraylist = array();
$arraylist['0'] = $langs->trans("No");
$arraylist['1'] = $langs->trans("Yes");
print $form->selectarray('usetls', $arraylist, $conf->global->LDAP_SERVER_USE_TLS);
-print ' '.$langs->trans("LDAPServerUseTLSExample").' ';
+print ''.$langs->trans("LDAPServerUseTLSExample").' ';
print '';
print ''.$langs->trans("ForANonAnonymousAccess").' ';
@@ -257,18 +258,18 @@ print " \n";
// DNAdmin
print '';
print ''.$langs->trans("LDAPAdminDn").' ';
-print ' ';
-print ' '.$langs->trans("LDAPAdminDnExample").' ';
+print ' ';
+print ''.$langs->trans("LDAPAdminDnExample").' ';
// Pass
print '';
print ''.$langs->trans("LDAPPassword").' ';
if (!empty($conf->global->LDAP_ADMIN_PASS)) {
- print ' '; // je le met en visible pour test
+ print ' '; // je le met en visible pour test
} else {
- print ' ';
+ print ' ';
}
-print ' '.$langs->trans('Password').' (ex: secret) ';
+print ''.$langs->trans('Password').' (ex: secret) ';
print '
';
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index dd6b22f7634..53cbc1aad69 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -1025,16 +1025,16 @@ if ($mode == 'marketplace') {
print '