From 4dd67503fd29fc635608ccfbfeac5e377e28774b Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 8 Jan 2025 11:11:10 +0100 Subject: [PATCH 01/13] modulebuilder fix double NothingToSetup --- htdocs/modulebuilder/template/admin/setup.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index d3b0f117bff..b8fd30a1aff 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -352,8 +352,6 @@ echo ''.$langs->trans("MyModuleSetupPage").'< if (!empty($formSetup->items)) { print $formSetup->generateOutput(true); print '
'; -} else { - print '
'.$langs->trans("NothingToSetup"); } From 504a8b8eaf4fb7be16798142e99940dfbcc35a81 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 8 Jan 2025 16:04:06 +0100 Subject: [PATCH 02/13] Fix some modulebuilder backward compatibility --- htdocs/modulebuilder/template/myobject_card.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index bcd37702167..bcaf7d9b74b 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -629,12 +629,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Show links to link elements $tmparray = $form->showLinkToObjectBlock($object, array(), array('myobject'), 1); - $linktoelem = $tmparray['linktoelem']; - $htmltoenteralink = $tmparray['htmltoenteralink']; - print $htmltoenteralink; - - $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - + if (is_array($tmparray)) { + $linktoelem = $tmparray['linktoelem']; + $htmltoenteralink = $tmparray['htmltoenteralink']; + print $htmltoenteralink; + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + } else { + // backward compatibility + $somethingshown = $form->showLinkedObjectBlock($object, $tmparray); + } print '
'; From 599d891284cd66a8eba94bf4f8050a7408ffb472 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Wed, 8 Jan 2025 18:24:46 +0100 Subject: [PATCH 03/13] Restore lines commented for test --- htdocs/core/class/translate.class.php | 22 +++++++++++++++-- htdocs/core/lib/functions.lib.php | 16 ++++--------- test/phpunit/test.php | 34 +++++++++++++++++---------- 3 files changed, 46 insertions(+), 26 deletions(-) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index ec0900a8ae7..4e3fa70483a 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -759,10 +759,28 @@ class Translate * @param string $param5 chaine de param5 * @return string Translated string */ + public function tr($key, $param1 = '', $param2 = '', $param3 = '', $param4 = '', $param5 = '') + { + return $this->transnoentitiesnoconv($key, $param1, $param2, $param3, $param4, $param5); + } + + /** + * Return translated value of a text string. Alias of tr() for backward compatibility. + * If there is no match for this text, we look in alternative file and if still not found, + * it is returned as is. + * No conversion to encoding charset of lang object is done. + * Parameters of this method must not contains any HTML tags. + * + * @param string $key Key to translate + * @param string $param1 chaine de param1 + * @param string $param2 chaine de param2 + * @param string $param3 chaine de param3 + * @param string $param4 chaine de param4 + * @param string $param5 chaine de param5 + * @return string Translated string + */ public function transnoentitiesnoconv($key, $param1 = '', $param2 = '', $param3 = '', $param4 = '', $param5 = '') { - global $conf; - if (!empty($this->tab_translate[$key])) { // Translation is available $str = $this->tab_translate[$key]; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 64d1f2137fa..7af08245d3c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2100,7 +2100,7 @@ function dol_escape_htmltag($stringtoescape, $keepb = 0, $keepn = 0, $noescapeta // In a future, we should not need this $tmp = (string) $stringtoescape; - /* + // We protect the 6 special entities that we don't want to decode. $tmp = str_ireplace('<', '__DONOTDECODELT', $tmp); $tmp = str_ireplace('>', '__DONOTDECODEGT', $tmp); @@ -2118,7 +2118,7 @@ function dol_escape_htmltag($stringtoescape, $keepb = 0, $keepn = 0, $noescapeta $tmp = str_ireplace('__DONOTDECODEQUOT', '"', $tmp); $tmp = str_ireplace('__DONOTDECODEAPOS', '&apos', $tmp); $tmp = str_ireplace('__DONOTDECODE39', ''', $tmp); - */ + $tmp = str_ireplace(''', '__SIMPLEQUOTE', $tmp); // HTML 4 } if (!$keepb) { @@ -2178,17 +2178,9 @@ function dol_escape_htmltag($stringtoescape, $keepb = 0, $keepn = 0, $noescapeta $tmp = str_ireplace('<', '__LESSTAN', $tmp); $tmp = str_ireplace('>', '__GREATERTHAN', $tmp); - } else { - // var_dump($tmp); - //$tmp = str_ireplace('<', '__LESSTHAN', $tmp); - //$tmp = str_ireplace('>', '__GREATERTHAN', $tmp); } - // Warning: htmlentities encode HTML tags like , but forget < > "es; ' ' & - // So we do it ourself afterfor < at > - //$tmp = str_ireplace('<', '&lt', $tmp); - //$tmp = str_ireplace('>', '&gt', $tmp); - //var_dump("eeeeeeeeeeeeeeeeeeeee"); - //var_dump($tmp); + + // Warning: htmlentities encode HTML tags like , but not < > "es; ' ' & that remains untouched. $result = htmlentities($tmp, ENT_COMPAT, 'UTF-8'); // Convert & into & and more... //print $result; diff --git a/test/phpunit/test.php b/test/phpunit/test.php index cfdfdd55d52..28272ff73f7 100755 --- a/test/phpunit/test.php +++ b/test/phpunit/test.php @@ -9,11 +9,21 @@ include "../../htdocs/master.inc.php"; include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -print ">>> dol_escape_htmltag(eée < > bbbold) - should not happen\n"; -print dol_escape_htmltag("eée < > bbbold", 1); +$langs->setDefaultLang('fr'); +$langs->loadLangs(array('main', 'companies')); + +var_dump($langs->tab_translate["Preview"]); + +print $langs->tr("Preview"); print "\n"; -print ">>> dol_escape_htmltag(eée < > bbbold)\n"; -print dol_escape_htmltag("eée < > bbbold", 1); +print $langs->trans("Preview"); +print "\n"; + +print ">>> dol_escape_htmltag(eée < > bbbold ç) - should not happen\n"; +print dol_escape_htmltag("eée < > bbbold ç", 1); +print "\n"; +print ">>> dol_escape_htmltag(eée < > bbbold ç)\n"; +print dol_escape_htmltag("eée < > bbbold ç", 1); print "\n"; print '>>> dol_escape_htmltag(<script>alert("azerty")</script>)'."\n"; print dol_escape_htmltag('<script>alert("azerty")</script>', 1); @@ -22,11 +32,11 @@ print "\n"; print "\n"; // dol_escape_htmltag(dol_htmlwithnojs(dol_string_onlythesehtmltags(dol_htmlentitiesbr($s), 1, 1, 1, array())), 1, 1, 'common', 0, 1); -print ">>> dolPrintHtml(eée < > bbbold) - should not happen\n"; -print dolPrintHtml("eée < > bbbold"); +print ">>> dolPrintHtml(eée < > bbbold ç) - should not happen\n"; +print dolPrintHtml("eée < > bbbold ç"); print "\n"; -print ">>> dolPrintHtml(eée < > bbbold)\n"; -print dolPrintHtml("eée < > bbbold"); +print ">>> dolPrintHtml(eée < > bbbold ç)\n"; +print dolPrintHtml("eée < > bbbold ç"); print "\n"; print '>>> dolPrintHtml(<script>alert("azerty")</script>)'."\n"; print dolPrintHtml('<script>alert("azerty")</script>'); @@ -35,11 +45,11 @@ print "\n"; print "\n"; // dol_escape_htmltag(dol_string_onlythesehtmltags(dol_htmlentitiesbr($s), 1, 0, 0, 0, array('br', 'b', 'font', 'hr', 'span')), 1, -1, '', 0, 1); -print ">>> dolPrintHtmlForattribute(eée < > bbbold)\n"; -print dolPrintHtmlForAttribute("eée < > bbbold"); +print ">>> dolPrintHtmlForattribute(eée < > bbbold ç)\n"; +print dolPrintHtmlForAttribute("eée < > bbbold ç"); print "\n"; -print ">>> dolPrintHtmlForAttribute(eée < > bbbold)\n"; -print dolPrintHtmlForAttribute("eée < > bbbold"); +print ">>> dolPrintHtmlForAttribute(eée < > bbbold ç)\n"; +print dolPrintHtmlForAttribute("eée < > bbbold ç"); print "\n"; print '>>> dolPrintHtmlForattribute(<script>alert("azerty")</script>)'."\n"; print dolPrintHtmlForAttribute('<script>alert("azerty")</script>'); From f186608695d6cf6c7c320a74f4ac82810f82ff2f Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Wed, 8 Jan 2025 18:47:31 +0100 Subject: [PATCH 04/13] Fix to allow use of payment in frame --- htdocs/public/payment/newpayment.php | 4 ++++ htdocs/public/payment/paymentko.php | 4 ++++ htdocs/public/payment/paymentok.php | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index e11b86d1c5b..4f0c94d5212 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -51,6 +51,10 @@ if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', '1'); } +if (!defined('XFRAMEOPTIONS_ALLOWALL')) { + define('XFRAMEOPTIONS_ALLOWALL', '1'); +} + // For MultiCompany module. // Do not use GETPOST here, function is not defined and get of entity must be done before including main.inc.php // Because 2 entities can have the same ref. diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 3f6f7c8a7c9..0670f5dd072 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -40,6 +40,10 @@ if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', '1'); } +if (!defined('XFRAMEOPTIONS_ALLOWALL')) { + define('XFRAMEOPTIONS_ALLOWALL', '1'); +} + // For MultiCompany module. // Do not use GETPOST here, function is not defined and this test must be done before including main.inc.php // Because 2 entities can have the same ref. diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index eb08a8a8279..c0f715855a6 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -43,6 +43,10 @@ if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', '1'); } +if (!defined('XFRAMEOPTIONS_ALLOWALL')) { + define('XFRAMEOPTIONS_ALLOWALL', '1'); +} + // For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // Because 2 entities can have the same ref. From e774bc4065247b6ca05449df048d60650b6106c3 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Wed, 8 Jan 2025 21:31:07 +0100 Subject: [PATCH 05/13] Debug v21 --- htdocs/public/payment/paymentko.php | 2 +- htdocs/public/payment/paymentok.php | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 0670f5dd072..f8460f8a799 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -197,7 +197,7 @@ if (!empty($_SESSION['ipaddress'])) { // To avoid to make action twice $companylangs->setDefaultLang($mysoc->default_lang); $companylangs->loadLangs(array('main', 'members', 'bills', 'paypal', 'paybox', 'stripe')); - $from = getDolGlobalString('MAILING_EMAIL_FROM', getDolGlobalString("MAIN_MAIL_EMAIL_FROM")); + $from = getDolGlobalString("MAIN_MAIL_EMAIL_FROM"); $sendto = $sendemail; $urlback = $_SERVER["REQUEST_URI"]; diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index c0f715855a6..b70871bdf2d 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -191,7 +191,7 @@ if ($ws) { $now = dol_now(); -dol_syslog("Callback url when a payment was done. query_string=".(empty($_SERVER["QUERY_STRING"]) ? '' : dol_escape_htmltag($_SERVER["QUERY_STRING"]))." script_uri=".(empty($_SERVER["SCRIPT_URI"]) ? '' : dol_escape_htmltag($_SERVER["SCRIPT_URI"])), LOG_DEBUG, 0, '_payment'); +dol_syslog("Callback url when a payment was done. doactionsthenredirect=".$doactionsthenredirect." query_string=".(empty($_SERVER["QUERY_STRING"]) ? '' : dol_escape_htmltag($_SERVER["QUERY_STRING"]))." script_uri=".(empty($_SERVER["SCRIPT_URI"]) ? '' : dol_escape_htmltag($_SERVER["SCRIPT_URI"])), LOG_DEBUG, 0, '_payment'); dol_syslog("_SERVER[SERVER_NAME] = ".(empty($_SERVER["SERVER_NAME"]) ? '' : dol_escape_htmltag($_SERVER["SERVER_NAME"])), LOG_DEBUG, 0, '_payment'); dol_syslog("_SERVER[SERVER_ADDR] = ".(empty($_SERVER["SERVER_ADDR"]) ? '' : dol_escape_htmltag($_SERVER["SERVER_ADDR"])), LOG_DEBUG, 0, '_payment'); @@ -1026,6 +1026,8 @@ if ($ispaymentok) { $object = new Commande($db); $result = $object->fetch((int) $tmptag['ORD']); if ($result) { + dol_syslog("We have loaded the order id=".$object->id." to use to create the invoice", LOG_DEBUG, 0, '_payment'); + $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"]; $paymentTypeId = 0; @@ -1054,6 +1056,8 @@ if ($ispaymentok) { } } + dol_syslog("The payment type id to use is paymentTypeId=".$paymentTypeId." and FinalPaymentAmt=".$FinalPaymentAmt, LOG_DEBUG, 0, '_payment'); + // Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time) if (isModEnabled('invoice')) { if (!empty($FinalPaymentAmt) && $paymentTypeId > 0) { @@ -1855,8 +1859,8 @@ if ($ispaymentok) { } } else { $msg = 'Failed to create invoice form contract ' . $tmptag['CON']; - if (!empty($cols)) { - $msg .= ' and col '. $cols .'.'; + if (!empty($tmptag['COL'])) { + $msg .= ' and col '. $tmptag['COL'] .'.'; } $postactionmessages[] = $msg; $ispostactionok = -1; @@ -1871,7 +1875,7 @@ if ($ispaymentok) { } } else { $msg = 'Contract paid ' . $tmptag['CON'] . ' was not found'; - if (!empty($cols)) { + if (!empty($tmptag['COL'])) { $msg .= ' for col '.$tmptag['COL'] .'.'; } $postactionmessages[] = $msg; @@ -1957,7 +1961,7 @@ if ($ispaymentok) { $companylangs->loadLangs(array('main', 'members', 'bills', 'paypal', 'paybox', 'stripe')); $sendto = $sendemail; - $from = getDolGlobalString('MAILING_EMAIL_FROM') ? $conf->global->MAILING_EMAIL_FROM : getDolGlobalString("MAIN_MAIL_EMAIL_FROM"); + $from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM'); // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file @@ -2022,6 +2026,7 @@ if ($ispaymentok) { $content .= "ErrorSeverityCode = ".$ErrorSeverityCode."
\n"; } + dol_syslog("Content of email: ".$content, LOG_DEBUG, 0, '_payment'); $ishtml = dol_textishtml($content); // May contain urls $trackid = ''; From 08b77d174d183198091de7a52b9a5c734b966af2 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Wed, 8 Jan 2025 23:29:04 +0100 Subject: [PATCH 06/13] Debug v21 --- htdocs/core/lib/payments.lib.php | 6 ++++-- htdocs/public/payment/newpayment.php | 10 ++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/payments.lib.php b/htdocs/core/lib/payments.lib.php index b60ea887f4f..1f1bbc0d394 100644 --- a/htdocs/core/lib/payments.lib.php +++ b/htdocs/core/lib/payments.lib.php @@ -249,7 +249,7 @@ function getHtmlOnlinePaymentLink($type, $ref, $label = '', $amount = 0) * @param string $ref Ref of object * @param int|float $amount Amount of money to request for * @param string $freetag Free tag (required and used for $type='free' only) - * @param int $localorexternal 0=Url for browser, 1=Url for external access + * @param int|string $localorexternal 0=Url of current browsing, 1=Url for external access, or string with virtual host url * @return string Url string */ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = 0, $freetag = 'your_tag', $localorexternal = 1) @@ -266,8 +266,10 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = 0, $freetag = 'y $urltouse = DOL_MAIN_URL_ROOT; // Should be "https://www.mydomain.com/mydolibarr" for example //dol_syslog("getOnlinePaymentUrl DOL_MAIN_URL_ROOT=".DOL_MAIN_URL_ROOT); - if ($localorexternal) { + if ((string) $localorexternal == '1') { $urltouse = $urlwithroot; + } elseif ((string) $localorexternal != '0') { + $urltouse = $localorexternal; } if ($type == 'free') { diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 4f0c94d5212..02dcc1ce6af 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -230,6 +230,16 @@ $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than curren $urlok = $urlwithroot.'/public/payment/paymentok.php?'; $urlko = $urlwithroot.'/public/payment/paymentko.php?'; +/* +if ($ws) { + include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; + $tmpwebsite = new WebSite($db); + $tmpwebsite->fetch(0, $ws); + $urlok = $tmpwebsite->virtualhost.'/public/payment/paymentok.php?'; + $urlko = $tmpwebsite->virtualhost.'/public/payment/paymentko.php?'; +} +*/ + // Complete urls for post treatment $ref = $REF = GETPOST('ref', 'alpha'); $TAG = GETPOST("tag", 'alpha'); From d75e02fd43373af3f098326b74553004c2147179 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Wed, 8 Jan 2025 23:52:35 +0100 Subject: [PATCH 07/13] Debug v21 --- htdocs/core/lib/website.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index c44bb31b429..86737d3defc 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -1354,7 +1354,9 @@ function getImageFromHtmlContent($htmlContent, $imageNumber = 1) } // Load HTML content into object - $dom->loadHTML($htmlContent); + // We add the @ to avoid verbose warnings logsin the error.log file. For example: + // "PHP message: PHP Warning: DOMDocument::loadHTML(): Tag section invalid in Entity, line: ...", etc. + @$dom->loadHTML($htmlContent); // Re-enable HTML load errors libxml_clear_errors(); From 3b45a24c0713ea5735bc33c41f6b3c7edd9a65ee Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Thu, 9 Jan 2025 01:30:13 +0100 Subject: [PATCH 08/13] Fix regression --- htdocs/core/lib/functions.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 7af08245d3c..f2268767734 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2176,6 +2176,7 @@ function dol_escape_htmltag($stringtoescape, $keepb = 0, $keepn = 0, $noescapeta } while ($diff); } + $tmp = str_ireplace('"', '__DOUBLEQUOT', $tmp); $tmp = str_ireplace('<', '__LESSTAN', $tmp); $tmp = str_ireplace('>', '__GREATERTHAN', $tmp); } @@ -2203,6 +2204,7 @@ function dol_escape_htmltag($stringtoescape, $keepb = 0, $keepn = 0, $noescapeta $result = str_ireplace('__SIMPLEQUOTE', ''', $result); + $result = str_ireplace('__DOUBLEQUOT', '"', $result); $result = str_ireplace('__LESSTAN', '<', $result); $result = str_ireplace('__GREATERTHAN', '>', $result); @@ -8526,7 +8528,8 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = ' // See options at https://tidy.sourceforge.net/docs/quickref.html $config = array( 'clean' => false, - 'quote-marks' => false, // do not replace " that are used for real text content (not a string symbol for html attribute) into " + // Best will be to set 'quote-marks' to false to not replace " that are used for real text content (not a string symbol for html attribute) into " + 'quote-marks' => false, 'doctype' => 'strict', 'show-body-only' => true, "indent-attributes" => false, From 6aae924377a0f7268094ba02e1ae6376ecc42263 Mon Sep 17 00:00:00 2001 From: Alexandre Janniaux Date: Wed, 8 Jan 2025 13:47:18 +0100 Subject: [PATCH 09/13] purchasesjournal: fix empty IN () SQL request `WHERE xx IN ()` is not allowed in PostgreSQL queries, and result in the following fatal error: GROUP BY fk_facture_fourn 33 DoliDBPgsql::query SQL Error message: ERROR: 42601: syntax error at or near ")" LINE 10: AND fk_facture_fourn IN () ^ We can check whether we have valid invoices before running the query, since the query will only check whether the invoices are complete or not. It also fixes the following error on the development PHP output. Fatal error: Uncaught TypeError: pg_num_rows(): Argument #1 ($result) must be of type PgSql\Result, bool given in /var/www/html/core/db/pgsql.class.php:654 Stack trace: #0 /var/www/html/core/db/pgsql.class.php(654): pg_num_rows(false) #1 /var/www/html/accountancy/journal/purchasesjournal.php(418): DoliDBPgsql->num_rows(false) #2 {main} thrown in /var/www/html/core/db/pgsql.class.php on line 654 Fixes #32374 --- .../accountancy/journal/purchasesjournal.php | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 1c64cc8934a..437b436b733 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -399,34 +399,34 @@ foreach ($tabfac as $key => $val) { // Loop on each invoice } } */ + // New way, single query, load all unbound lines -$sql = " -SELECT - fk_facture_fourn, - COUNT(fd.rowid) as nb -FROM - " . MAIN_DB_PREFIX . "facture_fourn_det as fd -WHERE - fd.product_type <= 2 - AND fd.fk_code_ventilation <= 0 - AND fd.total_ttc <> 0 - AND fk_facture_fourn IN (".$db->sanitize(implode(",", array_keys($tabfac))).") -GROUP BY fk_facture_fourn -"; -$resql = $db->query($sql); +if (!empty($tabfac)) { + $sql = " + SELECT + fk_facture_fourn, + COUNT(fd.rowid) as nb + FROM + " . MAIN_DB_PREFIX . "facture_fourn_det as fd + WHERE + fd.product_type <= 2 + AND fd.fk_code_ventilation <= 0 + AND fd.total_ttc <> 0 + AND fk_facture_fourn IN (".$db->sanitize(implode(",", array_keys($tabfac))).") + GROUP BY fk_facture_fourn + "; + $resql = $db->query($sql); -$num = $db->num_rows($resql); -$i = 0; -while ($i < $num) { - $obj = $db->fetch_object($resql); - if ($obj->nb > 0) { - $errorforinvoice[$obj->fk_facture_fourn] = 'somelinesarenotbound'; + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $obj = $db->fetch_object($resql); + if ($obj->nb > 0) { + $errorforinvoice[$obj->fk_facture_fourn] = 'somelinesarenotbound'; + } + $i++; } - $i++; } -//var_dump($errorforinvoice);exit; - - // Bookkeeping Write if ($action == 'writebookkeeping' && !$error && $user->hasRight('accounting', 'bind', 'write')) { From 3058f54f9eb1b0da10bac4646c5554863d459ffa Mon Sep 17 00:00:00 2001 From: Alexandre Janniaux Date: Wed, 8 Jan 2025 14:37:07 +0100 Subject: [PATCH 10/13] expensereportsjournal: fix empty IN () SQL request `WHERE xx IN ()` is not allowed in PostgreSQL queries, and result in fatal errors. We can check whether we have valid invoices before running the query, since the query will only check whether the invoices are complete or not. It also fixes the following error on the development PHP output: Fatal error: Uncaught TypeError: pg_num_rows(): Argument #1 ($result) must be of type PgSql\Result, bool given in /var/www/html/core/db/pgsql.class.php:654 Stack trace: #0 /var/www/html/core/db/pgsql.class.php(654): pg_num_rows(false) #1 /var/www/html/accountancy/journal/expensereportsjournal.php(264): DoliDBPgsql->num_rows(false) #2 {main} thrown in /var/www/html/core/db/pgsql.class.php on line 654 Refs #32374 but for the expensereportsjournal page. --- .../journal/expensereportsjournal.php | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index fb88ad3ac40..21131a25177 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -253,22 +253,24 @@ if ($result) { } // Load all unbound lines -$sql = "SELECT fk_expensereport, COUNT(erd.rowid) as nb"; -$sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as erd"; -$sql .= " WHERE erd.fk_code_ventilation <= 0"; -$sql .= " AND erd.total_ttc <> 0"; -$sql .= " AND fk_expensereport IN (".$db->sanitize(implode(",", array_keys($taber))).")"; -$sql .= " GROUP BY fk_expensereport"; -$resql = $db->query($sql); +if (!empty($taber)) { + $sql = "SELECT fk_expensereport, COUNT(erd.rowid) as nb"; + $sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as erd"; + $sql .= " WHERE erd.fk_code_ventilation <= 0"; + $sql .= " AND erd.total_ttc <> 0"; + $sql .= " AND fk_expensereport IN (".$db->sanitize(implode(",", array_keys($taber))).")"; + $sql .= " GROUP BY fk_expensereport"; + $resql = $db->query($sql); -$num = $db->num_rows($resql); -$i = 0; -while ($i < $num) { - $obj = $db->fetch_object($resql); - if ($obj->nb > 0) { - $errorforinvoice[$obj->fk_expensereport] = 'somelinesarenotbound'; + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $obj = $db->fetch_object($resql); + if ($obj->nb > 0) { + $errorforinvoice[$obj->fk_expensereport] = 'somelinesarenotbound'; + } + $i++; } - $i++; } // Bookkeeping Write From 8e551100a1ced8307ba0afa01e7e5bac013f1dd4 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Thu, 9 Jan 2025 01:41:24 +0100 Subject: [PATCH 11/13] Fix typo --- htdocs/accountancy/class/accountingjournal.class.php | 4 ++-- htdocs/accountancy/class/bookkeeping.class.php | 4 ++-- htdocs/adherents/class/adherent.class.php | 4 ++-- htdocs/adherents/class/adherent_type.class.php | 2 +- htdocs/asset/class/asset.class.php | 4 ++-- htdocs/asset/class/assetmodel.class.php | 4 ++-- htdocs/bom/class/bom.class.php | 4 ++-- htdocs/bom/class/bomline.class.php | 4 ++-- htdocs/bookcal/class/availabilities.class.php | 4 ++-- htdocs/bookcal/class/calendar.class.php | 4 ++-- htdocs/bookmarks/class/bookmark.class.php | 4 ++-- htdocs/categories/class/categorie.class.php | 4 ++-- htdocs/comm/mailing/class/mailing.class.php | 4 ++-- htdocs/comm/propal/class/propal.class.php | 4 ++-- htdocs/commande/class/commande.class.php | 4 ++-- htdocs/compta/bank/class/account.class.php | 4 ++-- htdocs/compta/bank/class/paymentvarious.class.php | 4 ++-- htdocs/compta/cashcontrol/class/cashcontrol.class.php | 4 ++-- htdocs/compta/facture/class/facture.class.php | 4 ++-- .../compta/paiement/cheque/class/remisecheque.class.php | 4 ++-- htdocs/compta/paiement/class/paiement.class.php | 4 ++-- htdocs/compta/sociales/class/chargesociales.class.php | 4 ++-- htdocs/compta/tva/class/tva.class.php | 4 ++-- htdocs/contact/class/contact.class.php | 4 ++-- htdocs/contrat/class/contrat.class.php | 4 ++-- htdocs/contrat/class/contratligne.class.php | 2 +- htdocs/core/class/fiscalyear.class.php | 4 ++-- htdocs/core/class/timespent.class.php | 4 ++-- htdocs/cron/class/cronjob.class.php | 4 ++-- htdocs/delivery/class/delivery.class.php | 2 +- htdocs/ecm/class/ecmfiles.class.php | 4 ++-- htdocs/emailcollector/class/emailcollector.class.php | 4 ++-- .../emailcollector/class/emailcollectoraction.class.php | 4 ++-- .../emailcollector/class/emailcollectorfilter.class.php | 4 ++-- .../eventorganization/class/conferenceorbooth.class.php | 4 ++-- .../class/conferenceorboothattendee.class.php | 4 ++-- htdocs/expedition/class/expedition.class.php | 4 ++-- htdocs/expensereport/class/expensereport.class.php | 4 ++-- htdocs/fichinter/class/fichinter.class.php | 4 ++-- htdocs/fourn/class/fournisseur.commande.class.php | 4 ++-- htdocs/fourn/class/fournisseur.facture.class.php | 4 ++-- htdocs/fourn/class/fournisseur.product.class.php | 4 ++-- htdocs/fourn/class/paiementfourn.class.php | 4 ++-- htdocs/holiday/class/holiday.class.php | 4 ++-- htdocs/hrm/class/establishment.class.php | 4 ++-- htdocs/hrm/class/evaluation.class.php | 4 ++-- htdocs/hrm/class/evaluationdet.class.php | 4 ++-- htdocs/hrm/class/job.class.php | 4 ++-- htdocs/hrm/class/skill.class.php | 4 ++-- htdocs/hrm/class/skilldet.class.php | 4 ++-- htdocs/hrm/class/skillrank.class.php | 4 ++-- htdocs/intracommreport/class/intracommreport.class.php | 4 ++-- .../knowledgemanagement/class/knowledgerecord.class.php | 4 ++-- htdocs/loan/class/loan.class.php | 4 ++-- htdocs/modulebuilder/template/class/myobject.class.php | 4 ++-- htdocs/mrp/class/mo.class.php | 4 ++-- htdocs/opensurvey/class/opensurveysondage.class.php | 4 ++-- htdocs/partnership/class/partnership.class.php | 4 ++-- htdocs/partnership/class/partnership_type.class.php | 4 ++-- htdocs/product/class/productfournisseurprice.class.php | 4 ++-- htdocs/product/inventory/class/inventory.class.php | 4 ++-- htdocs/product/stock/class/entrepot.class.php | 4 ++-- htdocs/product/stock/class/productlot.class.php | 4 ++-- .../stock/stocktransfer/class/stocktransfer.class.php | 4 ++-- .../stock/stocktransfer/class/stocktransferline.class.php | 4 ++-- htdocs/projet/class/project.class.php | 4 ++-- htdocs/projet/class/task.class.php | 4 ++-- htdocs/reception/class/reception.class.php | 4 ++-- htdocs/recruitment/class/recruitmentcandidature.class.php | 4 ++-- htdocs/recruitment/class/recruitmentjobposition.class.php | 4 ++-- htdocs/resource/class/dolresource.class.php | 4 ++-- htdocs/salaries/class/paymentsalary.class.php | 4 ++-- htdocs/salaries/class/salary.class.php | 4 ++-- htdocs/societe/class/companypaymentmode.class.php | 4 ++-- htdocs/societe/class/societe.class.php | 4 ++-- htdocs/societe/class/societeaccount.class.php | 4 ++-- .../supplier_proposal/class/supplier_proposal.class.php | 4 ++-- htdocs/ticket/class/cticketcategory.class.php | 4 ++-- htdocs/ticket/class/ticket.class.php | 4 ++-- htdocs/user/class/user.class.php | 4 ++-- htdocs/user/class/usergroup.class.php | 2 +- htdocs/webhook/class/target.class.php | 4 ++-- htdocs/website/class/websitepage.class.php | 4 ++-- htdocs/workstation/class/workstation.class.php | 4 ++-- htdocs/zapier/class/hook.class.php | 4 ++-- test/phpunit/test.php | 8 ++++---- 86 files changed, 170 insertions(+), 170 deletions(-) diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 3cc0aa41007..f863256def7 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -189,9 +189,9 @@ class AccountingJournal extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowAccountingJournal"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip"'; } diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index f34694ef5bc..c6e40ccfbfc 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -529,9 +529,9 @@ class BookKeeping extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowTransaction"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 42c1f192825..0e168adddb2 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2382,9 +2382,9 @@ class Adherent extends CommonObject if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $langs->load("users"); $label = $langs->trans("ShowUser"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index cf33af23343..1af9ebd608d 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -780,7 +780,7 @@ class AdherentType extends CommonObject } } $linkstart = ''; $linkend = ''; diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 75566f379a7..e90672c6d76 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -1408,9 +1408,9 @@ class Asset extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowAsset"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/asset/class/assetmodel.class.php b/htdocs/asset/class/assetmodel.class.php index 56852c052d6..fcb463504e4 100644 --- a/htdocs/asset/class/assetmodel.class.php +++ b/htdocs/asset/class/assetmodel.class.php @@ -619,9 +619,9 @@ class AssetModel extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowAssetModel"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index f204993c892..d779f11f4d7 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1159,9 +1159,9 @@ class BOM extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowBillOfMaterials"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/bom/class/bomline.class.php b/htdocs/bom/class/bomline.class.php index 5ebd98a756c..67b879078df 100644 --- a/htdocs/bom/class/bomline.class.php +++ b/htdocs/bom/class/bomline.class.php @@ -387,9 +387,9 @@ class BOMLine extends CommonObjectLine if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowBillOfMaterialsLine"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/bookcal/class/availabilities.class.php b/htdocs/bookcal/class/availabilities.class.php index d072343caae..8906b147c82 100644 --- a/htdocs/bookcal/class/availabilities.class.php +++ b/htdocs/bookcal/class/availabilities.class.php @@ -756,9 +756,9 @@ class Availabilities extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowAvailabilities"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/bookcal/class/calendar.class.php b/htdocs/bookcal/class/calendar.class.php index c96fbe2da34..db5eff037cd 100644 --- a/htdocs/bookcal/class/calendar.class.php +++ b/htdocs/bookcal/class/calendar.class.php @@ -742,9 +742,9 @@ class Calendar extends CommonObject if (empty($notooltip)) { if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowCalendar"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index f58d1839389..a356a06e216 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -319,9 +319,9 @@ class Bookmark extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowBookmark"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 21a642afd22..69ecf8b44bf 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1811,9 +1811,9 @@ class Categorie extends CommonObject if (empty($notooltip)) { if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.' '.$forced_color.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ' class="'.$forced_color.($morecss ? ' '.$morecss : '').'"'; diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index d86745f21e9..ff1e4a5f3ba 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -852,9 +852,9 @@ class Mailing extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowEMailing"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 077f2446540..a043f0b2627 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3831,9 +3831,9 @@ class Propal extends CommonObject if (empty($notooltip) && $user->hasRight('propal', 'lire')) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Proposal"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 26efa02d0d5..6cfffd457db 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3898,9 +3898,9 @@ class Commande extends CommonOrder if (empty($notooltip) && $user->hasRight('commande', 'lire')) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Order"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; $target_value = array('_self', '_blank', '_parent', '_top'); diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 37050661838..d3d0c3c2ddf 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1597,9 +1597,9 @@ class Account extends CommonObject if (empty($notooltip)) { if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("BankAccount"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index b474592d93d..7f38dab7af2 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -724,9 +724,9 @@ class PaymentVarious extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index 0e71db22c62..755c2f711eb 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -463,9 +463,9 @@ class CashControl extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index a3e4ef47bef..367b2ca8228 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2109,9 +2109,9 @@ class Facture extends CommonInvoice if (empty($notooltip) && $user->hasRight("facture", "read")) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Invoice"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index fae7d4894aa..ddce090b667 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -964,9 +964,9 @@ class RemiseCheque extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowCheckReceipt"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 29b19528619..f21b81f9fa0 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -1415,9 +1415,9 @@ class Paiement extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Payment"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 7e64a35e963..f6ca5ff79dc 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -688,9 +688,9 @@ class ChargeSociales extends CommonObject if (empty($notooltip) && $user->hasRight("facture", "read")) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("SocialContribution"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip"'; } diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 1b68ceaf8ae..1222d7c1472 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -783,9 +783,9 @@ class Tva extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 1e19a39b9f6..f6acb419e47 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1571,9 +1571,9 @@ class Contact extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowContact"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index ea22c7c335b..9e87b95609f 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2133,9 +2133,9 @@ class Contrat extends CommonObject if (empty($notooltip) && $user->hasRight('contrat', 'lire')) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowContract"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } $linkstart = ''; $linkend = ''; diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 49199c22397..571b2b1fda3 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -355,9 +355,9 @@ class Fiscalyear extends CommonObject if (empty($notooltip) && $user->hasRight('accounting', 'fiscalyear', 'write')) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("FiscalPeriod"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } diff --git a/htdocs/core/class/timespent.class.php b/htdocs/core/class/timespent.class.php index 8619d3c182e..fdd8dd83bcd 100644 --- a/htdocs/core/class/timespent.class.php +++ b/htdocs/core/class/timespent.class.php @@ -757,9 +757,9 @@ class TimeSpent extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowTimeSpent"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 1e1188bc803..770e6cae0c7 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1105,9 +1105,9 @@ class Cronjob extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowCronJob"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php index 8ce08f70496..4256a27ff6b 100644 --- a/htdocs/delivery/class/delivery.class.php +++ b/htdocs/delivery/class/delivery.class.php @@ -809,7 +809,7 @@ class Delivery extends CommonObject //} $linkstart = ''; $linkend = ''; diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 08dedc5af94..142aaf70270 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -1024,9 +1024,9 @@ class EcmFiles extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowFile"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.' '.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index fdce091a762..344c25a7baf 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -638,9 +638,9 @@ class EmailCollector extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowEmailCollector"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index 23c6e3fe2b3..198d5ed878f 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -322,9 +322,9 @@ class EmailCollectorAction extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowEmailcollectorAction"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; /* diff --git a/htdocs/emailcollector/class/emailcollectorfilter.class.php b/htdocs/emailcollector/class/emailcollectorfilter.class.php index cdbd6cd72db..dc32722847e 100644 --- a/htdocs/emailcollector/class/emailcollectorfilter.class.php +++ b/htdocs/emailcollector/class/emailcollectorfilter.class.php @@ -333,9 +333,9 @@ class EmailCollectorFilter extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowEmailcollectorFilter"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; /* diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php index 3970d31b28a..2defceeee72 100644 --- a/htdocs/eventorganization/class/conferenceorbooth.class.php +++ b/htdocs/eventorganization/class/conferenceorbooth.class.php @@ -609,9 +609,9 @@ class ConferenceOrBooth extends ActionComm if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowConferenceOrBooth"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - //$linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + //$linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index 2fcfad64400..8512701a0bb 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -852,9 +852,9 @@ class ConferenceOrBoothAttendee extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowConferenceOrBoothAttendee"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index ec961a947a8..10f7f21e68e 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -2003,9 +2003,9 @@ class Expedition extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Shipment"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 1208a576e4c..3bd2e0feb35 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1861,9 +1861,9 @@ class ExpenseReport extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowExpenseReport"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 3573db46759..98dd96d141e 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -936,9 +936,9 @@ class Fichinter extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowIntervention"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 623eae1c2a7..9fe9b26f578 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1077,9 +1077,9 @@ class CommandeFournisseur extends CommonOrder if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowOrder"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index c575b65cbf7..dab5dea6d6c 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -2924,9 +2924,9 @@ class FactureFournisseur extends CommonInvoice if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowSupplierInvoice"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index c5f6afd03d8..ba3329041f5 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -1420,9 +1420,9 @@ class ProductFournisseur extends Product if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("SupplierRef"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index be4da6d614a..842fa8b56c0 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -710,9 +710,9 @@ class PaiementFourn extends Paiement if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Payment"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index e75bdcbb2f1..c6808b57aff 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1454,9 +1454,9 @@ class Holiday extends CommonObject if (empty($notooltip)) { if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 32e0297b72d..e81a051e9e0 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -467,9 +467,9 @@ class Establishment extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Establishment"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index 75283902686..51b0c78ed3a 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -779,9 +779,9 @@ class Evaluation extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowEvaluation"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/hrm/class/evaluationdet.class.php b/htdocs/hrm/class/evaluationdet.class.php index c905a907075..17b98170904 100644 --- a/htdocs/hrm/class/evaluationdet.class.php +++ b/htdocs/hrm/class/evaluationdet.class.php @@ -741,9 +741,9 @@ class EvaluationLine extends CommonObjectLine if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowEvaluationdet"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php index 5cfe2d75534..1377ad1db43 100644 --- a/htdocs/hrm/class/job.class.php +++ b/htdocs/hrm/class/job.class.php @@ -763,9 +763,9 @@ class Job extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowJob"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index 9c8d1f5875e..9c8239465aa 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -821,9 +821,9 @@ class Skill extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowSkill"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/hrm/class/skilldet.class.php b/htdocs/hrm/class/skilldet.class.php index 3f7851e7371..cc0d8d1faa5 100644 --- a/htdocs/hrm/class/skilldet.class.php +++ b/htdocs/hrm/class/skilldet.class.php @@ -723,9 +723,9 @@ class Skilldet extends CommonObjectLine if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowSkilldet"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php index 730c0382aa5..06cefd85cc1 100644 --- a/htdocs/hrm/class/skillrank.class.php +++ b/htdocs/hrm/class/skillrank.class.php @@ -769,9 +769,9 @@ class SkillRank extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowSkillRank"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/intracommreport/class/intracommreport.class.php b/htdocs/intracommreport/class/intracommreport.class.php index d68983b7ec0..5bc4c30dfdc 100644 --- a/htdocs/intracommreport/class/intracommreport.class.php +++ b/htdocs/intracommreport/class/intracommreport.class.php @@ -708,9 +708,9 @@ class IntracommReport extends CommonObject if (empty($notooltip)) { if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/knowledgemanagement/class/knowledgerecord.class.php b/htdocs/knowledgemanagement/class/knowledgerecord.class.php index 6087d8b4ec8..f2eb7fb8fe4 100644 --- a/htdocs/knowledgemanagement/class/knowledgerecord.class.php +++ b/htdocs/knowledgemanagement/class/knowledgerecord.class.php @@ -842,9 +842,9 @@ class KnowledgeRecord extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowKnowledgeRecord"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index ae7627118af..ec13a9ec94b 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -630,9 +630,9 @@ class Loan extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 1b05f9d454c..f9251809d17 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -833,9 +833,9 @@ class MyObject extends CommonObject if (empty($notooltip)) { if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index e0eed1f35b7..c9a54f04c89 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1511,9 +1511,9 @@ class Mo extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMo"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 1b2255f508b..3d8135fa900 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -575,9 +575,9 @@ class Opensurveysondage extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php index 041697f0fba..86d0cb5700a 100644 --- a/htdocs/partnership/class/partnership.class.php +++ b/htdocs/partnership/class/partnership.class.php @@ -1060,9 +1060,9 @@ class Partnership extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowPartnership"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/partnership/class/partnership_type.class.php b/htdocs/partnership/class/partnership_type.class.php index 14b7c6f079a..2df2d083bef 100644 --- a/htdocs/partnership/class/partnership_type.class.php +++ b/htdocs/partnership/class/partnership_type.class.php @@ -288,9 +288,9 @@ class PartnershipType extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/product/class/productfournisseurprice.class.php b/htdocs/product/class/productfournisseurprice.class.php index 8ba462dbc73..6da02f15b30 100644 --- a/htdocs/product/class/productfournisseurprice.class.php +++ b/htdocs/product/class/productfournisseurprice.class.php @@ -744,9 +744,9 @@ class ProductFournisseurPrice extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowProductFournisseurPrice"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index f9d82b84d0e..be7b8398f46 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -602,9 +602,9 @@ class Inventory extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowInventory"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index c1181103a8e..3ca48bbd39d 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -848,9 +848,9 @@ class Entrepot extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Warehouse"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index e36bcb0ebea..1c7d90d763c 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -1228,9 +1228,9 @@ class Productlot extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php index 69663fb238d..0c7a35b4251 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php @@ -827,9 +827,9 @@ class StockTransfer extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowStockTransfer"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php index fbd31eea1bf..841fbdeb54f 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php @@ -758,9 +758,9 @@ class StockTransferLine extends CommonObjectLine if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowStockTransferLine"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 0c2800dc914..2ced6566fb2 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1483,9 +1483,9 @@ class Project extends CommonObject if (empty($notooltip) && $user->hasRight('projet', 'lire')) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowProject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index e0ebe42127e..86c4b333018 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1030,9 +1030,9 @@ class Task extends CommonObjectLine if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowTask"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.' nowraponall"'; } else { $linkclose .= ' class="nowraponall"'; diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index ee230ff84f1..34f3d736857 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -1352,9 +1352,9 @@ class Reception extends CommonObject if (empty($notooltip)) { if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Reception"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip"'; } diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 75b3dfe0819..45a3c3a827b 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -799,9 +799,9 @@ class RecruitmentCandidature extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowRecruitmentCandidature"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index 3eaa3619e33..67b04b6c05b 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -858,9 +858,9 @@ class RecruitmentJobPosition extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowRecruitmentJobPosition"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 04bb088238c..8ea926faa86 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -957,9 +957,9 @@ class Dolresource extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/salaries/class/paymentsalary.class.php b/htdocs/salaries/class/paymentsalary.class.php index 32205e8e4e2..816837e13b8 100644 --- a/htdocs/salaries/class/paymentsalary.class.php +++ b/htdocs/salaries/class/paymentsalary.class.php @@ -902,9 +902,9 @@ class PaymentSalary extends CommonObject if (empty($notooltip)) { if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("SalaryPayment"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php index 3d4ff5fba8b..941cee025bc 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -614,9 +614,9 @@ class Salary extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index af4f766b89e..107ee3af714 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -499,9 +499,9 @@ class CompanyPaymentMode extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowCompanyPaymentMode"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 312a41842fb..1d7278399d1 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3115,9 +3115,9 @@ class Societe extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowCompany"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').' refurl valignmiddle"'; $target_value = array('_self', '_blank', '_parent', '_top'); if (in_array($target, $target_value)) { diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 9514a76dc42..add72341158 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -514,9 +514,9 @@ class SocieteAccount extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("WebsiteAccount"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index ba6dbc98da9..ec208b3e905 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -2600,9 +2600,9 @@ class SupplierProposal extends CommonObject if (empty($notooltip) && $user->hasRight('propal', 'lire')) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowSupplierProposal"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } diff --git a/htdocs/ticket/class/cticketcategory.class.php b/htdocs/ticket/class/cticketcategory.class.php index 29e65b4021b..d34b0a2187e 100644 --- a/htdocs/ticket/class/cticketcategory.class.php +++ b/htdocs/ticket/class/cticketcategory.class.php @@ -499,9 +499,9 @@ class CTicketCategory extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index f09feeefee1..643ebf548f4 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1651,9 +1651,9 @@ class Ticket extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowTicket"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index caff78932cb..1ea16d01c17 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -3170,9 +3170,9 @@ class User extends CommonObject if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $langs->load("users"); $label = $langs->trans("ShowUser"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams . ' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 36251b2bed8..81b9945e780 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -875,7 +875,7 @@ class UserGroup extends CommonObject $label = $langs->trans("ShowGroup"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1, 1).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } diff --git a/htdocs/webhook/class/target.class.php b/htdocs/webhook/class/target.class.php index e11fd3f4700..d15e25d5457 100644 --- a/htdocs/webhook/class/target.class.php +++ b/htdocs/webhook/class/target.class.php @@ -767,9 +767,9 @@ class Target extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowTarget"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index a85d37257f0..59c5afa6c8d 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -887,9 +887,9 @@ class WebsitePage extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/workstation/class/workstation.class.php b/htdocs/workstation/class/workstation.class.php index 03ce7d506f5..a4e9c3157cd 100644 --- a/htdocs/workstation/class/workstation.class.php +++ b/htdocs/workstation/class/workstation.class.php @@ -661,9 +661,9 @@ class Workstation extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowWorkstation"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/zapier/class/hook.class.php b/htdocs/zapier/class/hook.class.php index 5c5cf97b42f..cab56314ff3 100644 --- a/htdocs/zapier/class/hook.class.php +++ b/htdocs/zapier/class/hook.class.php @@ -494,9 +494,9 @@ class Hook extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } - $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; + $linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/test/phpunit/test.php b/test/phpunit/test.php index 28272ff73f7..6e8f0c8565a 100755 --- a/test/phpunit/test.php +++ b/test/phpunit/test.php @@ -46,11 +46,11 @@ print "\n"; // dol_escape_htmltag(dol_string_onlythesehtmltags(dol_htmlentitiesbr($s), 1, 0, 0, 0, array('br', 'b', 'font', 'hr', 'span')), 1, -1, '', 0, 1); print ">>> dolPrintHtmlForattribute(eée < > bbbold ç)\n"; -print dolPrintHtmlForAttribute("eée < > bbbold ç"); +print dolPrintHTMLForAttribute("eée < > bbbold ç"); print "\n"; -print ">>> dolPrintHtmlForAttribute(eée < > bbbold ç)\n"; -print dolPrintHtmlForAttribute("eée < > bbbold ç"); +print ">>> dolPrintHTMLForAttribute(eée < > bbbold ç)\n"; +print dolPrintHTMLForAttribute("eée < > bbbold ç"); print "\n"; print '>>> dolPrintHtmlForattribute(<script>alert("azerty")</script>)'."\n"; -print dolPrintHtmlForAttribute('<script>alert("azerty")</script>'); +print dolPrintHTMLForAttribute('<script>alert("azerty")</script>'); print "\n"; From bea62d5cd9f144787b69b0fff8d7c7956fd89b3d Mon Sep 17 00:00:00 2001 From: Alexandre Janniaux Date: Wed, 8 Jan 2025 14:51:08 +0100 Subject: [PATCH 12/13] bookkeeping: listbyaccount: fix $num_rows warning Fix the following warning: Warning: Undefined property: PgSql\Result::$num_rows in /var/www/html/accountancy/bookkeeping/listbyaccount.php on line 160 The warning is happening when listing the operations after the accounting setup is done but no accounts for bank nor operations are created. --- htdocs/accountancy/bookkeeping/listbyaccount.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 7834b2a6d0f..6ac7e2637f9 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -155,7 +155,7 @@ if (empty($search_date_start) && empty($search_date_end) && !GETPOSTISSET('searc $sql .= $db->plimit(1); $res = $db->query($sql); - if ($res->num_rows > 0) { + if ($res !== false && $db->num_rows($res) > 0) { $fiscalYear = $db->fetch_object($res); $search_date_start = strtotime($fiscalYear->date_start); $search_date_end = strtotime($fiscalYear->date_end); From 631a31c1033fae236c984a865eb580f0eeccf3cc Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Thu, 9 Jan 2025 02:23:32 +0100 Subject: [PATCH 13/13] Debug v21 --- htdocs/website/index.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index fc11f5ec7ff..b69a1697d3f 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3224,6 +3224,24 @@ if (!GETPOST('hide_websitemenu')) { $examplewithapache .= "#ErrorLog /var/log/apache2/".$websitekey."_error_log\n"; $examplewithapache .= "#TransferLog /var/log/apache2/".$websitekey."_access_log\n"; + $examplewithapache .= "\n"; + $examplewithapache .= "# If you need include the payment page into a frame of the website,\n"; + $examplewithapache .= "# you need to make a proxy redirection of URLs required for the payment to your backoffice pages\n"; + $examplewithapache .= "#SSLProxyEngine On\n"; + $examplewithapache .= "#SSLProxyVerify none\n"; + $examplewithapache .= "#SSLProxyCheckPeerCN off\n"; + $examplewithapache .= "#SSLProxyCheckPeerName off\n"; + $examplewithapache .= "#ProxyPreserveHost Off\n"; + $examplewithapache .= '#ProxyPass "/public/payment/" "'.$urlwithroot.'/public/payment/'."\n"; + $examplewithapache .= '#ProxyPassReverse "/public/payment/" "'.$urlwithroot.'/public/payment/'."\n"; + $examplewithapache .= '#ProxyPass "/includes/" "'.$urlwithroot.'/includes/'."\n"; + $examplewithapache .= '#ProxyPassReverse "/includes/" "'.$urlwithroot.'/includes/'."\n"; + $examplewithapache .= '#ProxyPass "/theme/" "'.$urlwithroot.'/theme/'."\n"; + $examplewithapache .= '#ProxyPassReverse "/theme/" "'.$urlwithroot.'/theme/'."\n"; + $examplewithapache .= '#ProxyPass "/core/js/" "'.$urlwithroot.'/core/js/'."\n"; + $examplewithapache .= '#ProxyPassReverse "/core/js/" "'.$urlwithroot.'/core/js/'."\n"; + $examplewithapache .= "\n"; + $examplewithapache .= "\n"; $htmltext .= '
'.$langs->trans("ExampleToUseInApacheVirtualHostConfig").':
';