diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 6405a55c689..a0cd11c3ec1 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -508,7 +508,7 @@ class AccountingAccount extends CommonObject // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 942ad1d8da2..b687310193a 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -488,7 +488,7 @@ class BookKeeping extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index ff95a7a2aa7..834a1e75a65 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2314,7 +2314,7 @@ class Adherent extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 44b2fb349d6..7d7adaa2d93 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -759,7 +759,7 @@ class AdherentType extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 7f130d70b62..fb394afbf3e 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -429,7 +429,7 @@ class Subscription extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index d40b4d7b61f..7223a7d5c57 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -475,7 +475,7 @@ print '
'; print ''; print ''; print ''; -print ''; +print ''; print "\n"; $substitutionarray = pdf_getSubstitutionArray($langs, array('objectamount'), null, 2); @@ -503,13 +503,13 @@ print ''."\n"; print ''."\n"; print ''; print ''; -print ''; print ''; @@ -517,7 +517,7 @@ print ''; // Allow online signing print ''; print ''; -print ''; // Allow external download print ''; print ''; -print ''; print ''; diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index afe5d4d3520..925076b1ee7 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -429,10 +429,12 @@ foreach ($configfileparameters as $key => $value) { global $dolibarr_main_cookie_cryptkey, $dolibarr_main_instance_unique_id; $valuetoshow = $dolibarr_main_instance_unique_id ? $dolibarr_main_instance_unique_id : $dolibarr_main_cookie_cryptkey; // Use $dolibarr_main_instance_unique_id first then $dolibarr_main_cookie_cryptkey if (empty($dolibarr_main_prod)) { - print ''; + print ''; print showValueWithClipboardCPButton($valuetoshow, 0, '********'); + print '     '.$langs->trans("ThisValueCanBeReadBecauseInstanceIsNotInProductionMode").''; } else { print '**********'; + print '     '.$langs->trans("SeeConfFile").''; } if (empty($valuetoshow)) { print img_warning("EditConfigFileToAddEntry", 'dolibarr_main_instance_unique_id'); diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 05b1e4a2433..7f6c95e8d36 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -1313,7 +1313,7 @@ class Asset extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/asset/class/assetmodel.class.php b/htdocs/asset/class/assetmodel.class.php index 8f777144f6e..458715f7123 100644 --- a/htdocs/asset/class/assetmodel.class.php +++ b/htdocs/asset/class/assetmodel.class.php @@ -580,7 +580,7 @@ class AssetModel extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index d2e7ab950d2..bf942c7ad86 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1176,7 +1176,7 @@ class BOM extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { @@ -1985,7 +1985,7 @@ class BOMLine extends CommonObjectLine if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/bookcal/class/availabilities.class.php b/htdocs/bookcal/class/availabilities.class.php index 6da76ad4a80..90dd80db888 100644 --- a/htdocs/bookcal/class/availabilities.class.php +++ b/htdocs/bookcal/class/availabilities.class.php @@ -722,7 +722,7 @@ class Availabilities extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($url && $add_save_lastsearch_values) { diff --git a/htdocs/bookcal/class/calendar.class.php b/htdocs/bookcal/class/calendar.class.php index a8669bebae4..38238d00a6b 100644 --- a/htdocs/bookcal/class/calendar.class.php +++ b/htdocs/bookcal/class/calendar.class.php @@ -759,7 +759,7 @@ class Calendar extends CommonObject if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($url && $add_save_lastsearch_values) { diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index afac3563dee..c131aa80b25 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -308,7 +308,7 @@ class Bookmark extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 6e9af651656..690cb9ab83b 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1780,7 +1780,7 @@ class ActionComm extends CommonObject if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index 732615a619b..9564c106f0f 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -823,7 +823,7 @@ class Mailing extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 0ce773b26c0..9c251ccd6af 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3857,7 +3857,7 @@ class Propal extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 02447424acb..31e1f744ccb 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3853,7 +3853,7 @@ class Commande extends CommonOrder if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 7885b030b1f..d85cab45ccc 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1504,7 +1504,7 @@ class Account extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 33342098dbc..3ae95881487 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -669,7 +669,7 @@ class PaymentVarious extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index fd4b38b5f66..7f18558307f 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -429,7 +429,7 @@ class CashControl extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index b4271907e40..0c9d7b08f28 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1441,7 +1441,7 @@ class FactureRec extends CommonInvoice if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index c312fc5f1b8..7f6289df193 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -106,11 +106,6 @@ class Facture extends CommonInvoice */ protected $table_ref_field = 'ref'; - /** - * @var int thirdparty ID - */ - public $socid; - public $author; /** @@ -149,7 +144,6 @@ class Facture extends CommonInvoice */ public $fk_user_modif; - public $date; // Date invoice public $datem; /** @@ -194,19 +188,6 @@ class Facture extends CommonInvoice public $resteapayer; - /** - * ! Closing after partial payment: discount_vat, badcustomer or badsupplier, bankcharge, other - * ! Closing when no payment: replaced, abandoned - * @var string Close code - */ - public $close_code; - - /** - * ! Comment if paid without full payment - * @var string Close note - */ - public $close_note; - /** * 1 if invoice paid COMPLETELY, 0 otherwise (do not use it anymore, use statut and close_code) */ @@ -223,9 +204,6 @@ class Facture extends CommonInvoice public $linked_objects = array(); public $date_lim_reglement; - public $cond_reglement_code; // Code in llx_c_paiement - public $cond_reglement_doc; // Code in llx_c_paiement - public $mode_reglement_code; // Code in llx_c_paiement /** * @var int ID Field to store bank id to use when payment mode is withdraw @@ -2034,7 +2012,7 @@ class Facture extends CommonInvoice if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index be6ffd999cd..1341f0c4efb 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -915,7 +915,7 @@ class RemiseCheque extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 02db5cbe224..98c125fed05 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1381,7 +1381,7 @@ class BonPrelevement extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 5b8d59fe073..694024a1b1f 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -598,7 +598,7 @@ class ChargeSociales extends CommonObject if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index a5488ab5e43..cf290915cc7 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -733,7 +733,7 @@ class Tva extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 54c9f961f75..8ec4fd2c006 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1483,7 +1483,7 @@ class Contact extends CommonObject if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($url && $add_save_lastsearch_values) { diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index cce08f36e92..15b36b6a71c 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1511,7 +1511,7 @@ if ($action == 'create') { print '
'; while ($cursorline <= $nbofservices) { print '
'; - print '
'; + print ''; print ''; print ''; print ''; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 1b3e60939e0..b6b956b608c 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -113,6 +113,14 @@ class Contrat extends CommonObject */ public $socid; + /** + * Client id linked to the contract + * @var int + * @deprecated Use $socid + */ + public $fk_soc; + + public $societe; // Objet societe /** @@ -485,7 +493,7 @@ class Contrat extends CommonObject public function validate(User $user, $force_number = '', $notrigger = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - global $langs, $conf; + global $conf; $now = dol_now(); @@ -602,7 +610,6 @@ class Contrat extends CommonObject public function reopen($user, $notrigger = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - global $langs, $conf; $now = dol_now(); @@ -662,7 +669,7 @@ class Contrat extends CommonObject */ public function fetch($id, $ref = '', $ref_customer = '', $ref_supplier = '') { - $sql = "SELECT rowid, statut as status, ref, fk_soc,"; + $sql = "SELECT rowid, statut as status, ref, fk_soc as thirdpartyid,"; $sql .= " ref_supplier, ref_customer,"; $sql .= " ref_ext,"; $sql .= " entity,"; @@ -724,8 +731,8 @@ class Contrat extends CommonObject $this->fk_projet = $obj->fk_project; // deprecated $this->fk_project = $obj->fk_project; - $this->socid = $obj->fk_soc; - $this->fk_soc = $obj->fk_soc; + $this->socid = $obj->thirdpartyid; + $this->fk_soc = $obj->thirdpartyid; $this->last_main_doc = $obj->last_main_doc; $this->extraparams = (isset($obj->extraparams) ? (array) json_decode($obj->extraparams, true) : null); @@ -775,8 +782,6 @@ class Contrat extends CommonObject public function fetch_lines($only_services = 0, $loadalsotranslation = 0) { // phpcs:enable - global $langs, $conf; - $this->nbofservices = 0; $this->nbofserviceswait = 0; $this->nbofservicesopened = 0; @@ -1097,7 +1102,6 @@ class Contrat extends CommonObject continue; // ignore this, already forced previously } - //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object } } else { @@ -1309,7 +1313,7 @@ class Contrat extends CommonObject */ public function update($user, $notrigger = 0) { - global $conf, $langs; + global $conf; $error = 0; // Clean parameters @@ -1319,8 +1323,8 @@ class Contrat extends CommonObject if (empty($this->fk_commercial_suivi) && $this->commercial_suivi_id > 0) { $this->fk_commercial_suivi = $this->commercial_suivi_id; } - if (empty($this->fk_soc) && $this->socid > 0) { - $this->fk_soc = (int) $this->socid; + if (empty($this->socid) && $this->fk_soc > 0) { + $this->socid = (int) $this->fk_soc; } if (empty($this->fk_project) && $this->projet > 0) { $this->fk_project = (int) $this->projet; @@ -1344,8 +1348,11 @@ class Contrat extends CommonObject if (isset($this->statut)) { $this->statut = (int) $this->statut; } - if (isset($this->fk_soc)) { - $this->fk_soc = (int) $this->fk_soc; + if (isset($this->status)) { + $this->status = (int) $this->status; + } + if (isset($this->socid)) { + $this->socid = (int) $this->socid; } if (isset($this->fk_commercial_signature)) { $this->fk_commercial_signature = trim($this->fk_commercial_signature); @@ -1375,8 +1382,8 @@ class Contrat extends CommonObject $sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").","; $sql .= " entity=".$conf->entity.","; $sql .= " date_contrat=".(dol_strlen($this->date_contrat) != 0 ? "'".$this->db->idate($this->date_contrat)."'" : 'null').","; - $sql .= " statut=".(isset($this->statut) ? $this->statut : "null").","; - $sql .= " fk_soc=".($this->fk_soc > 0 ? $this->fk_soc : "null").","; + $sql .= " statut=".(isset($this->statut) ? $this->statut : (isset($this->status) ? $this->status : "null")).","; + $sql .= " fk_soc=".($this->socid > 0 ? $this->socid : "null").","; $sql .= " fk_projet=".($this->fk_project > 0 ? $this->fk_project : "null").","; $sql .= " fk_commercial_signature=".(isset($this->fk_commercial_signature) ? $this->fk_commercial_signature : "null").","; $sql .= " fk_commercial_suivi=".(isset($this->fk_commercial_suivi) ? $this->fk_commercial_suivi : "null").","; @@ -2073,9 +2080,9 @@ class Contrat extends CommonObject //if ($option !== 'nolink') //{ - // Add param to save lastsearch_values or not - $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + // Add param to save lastsearch_values or not + $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index a8ca8a67444..0c8940e46e2 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -497,7 +497,7 @@ if ($resql) { print '
'; // Not activated services -$sql = "SELECT c.ref, c.fk_soc, cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat,"; +$sql = "SELECT c.ref, c.fk_soc as thirdpartyid, cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat,"; $sql .= " s.nom as name, s.name_alias, s.logo, s.rowid as socid, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,"; $sql .= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype, p.entity as pentity"; $sql .= " FROM (".MAIN_DB_PREFIX."contrat as c"; @@ -534,7 +534,7 @@ if ($resql) { while ($i < $num) { $obj = $db->fetch_object($resql); - $staticcompany->id = $obj->fk_soc; + $staticcompany->id = $obj->thirdpartyid; $staticcompany->name = $obj->name; $staticcompany->name_alias = $obj->name_alias; $staticcompany->photo = 1; @@ -590,7 +590,7 @@ if ($resql) { print '
'; // Expired services -$sql = "SELECT c.ref, c.fk_soc, cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat,"; +$sql = "SELECT c.ref, c.fk_soc as thirdpartyid, cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat,"; $sql .= " s.nom as name, s.name_alias, s.logo, s.rowid as socid, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,"; $sql .= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype, p.entity as pentity"; $sql .= " FROM (".MAIN_DB_PREFIX."contrat as c"; @@ -628,7 +628,7 @@ if ($resql) { while ($i < $num) { $obj = $db->fetch_object($resql); - $staticcompany->id = $obj->fk_soc; + $staticcompany->id = $obj->thirdpartyid; $staticcompany->name = $obj->name; $staticcompany->name_alias = $obj->name_alias; $staticcompany->photo = 1; diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 9907ac5f397..1e891a8a6ab 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1733,4 +1733,51 @@ abstract class CommonDocGenerator return 1; } + + /** + * Define Array Column Field into $this->cols + * This method must be implemented by the module that generate the document with its own columns. + * + * @param Object $object Common object + * @param Translate $outputlangs Langs + * @param int $hidedetails Do not show line details + * @param int $hidedesc Do not show desc + * @param int $hideref Do not show ref + * @return void + */ + public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) + { + // Default field style for content + $this->defaultContentsFieldsStyle = array( + 'align' => 'R', // R,C,L + 'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ); + + // Default field style for content + $this->defaultTitlesFieldsStyle = array( + 'align' => 'C', // R,C,L + 'padding' => array(0.5, 0, 0.5, 0), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ); + + // Example + /* + $rank = 0; // do not use negative rank + $this->cols['desc'] = array( + 'rank' => $rank, + 'width' => false, // only for desc + 'status' => true, + 'title' => array( + 'textkey' => 'Designation', // use lang key is usefull in somme case with module + 'align' => 'L', + // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label + // 'label' => ' ', // the final label + 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + 'content' => array( + 'align' => 'L', + 'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + ); + */ + } } diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index d01c85c88a2..31e412f700e 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -43,6 +43,52 @@ abstract class CommonInvoice extends CommonObject */ public $subtype; + /** + * @var int Thirdparty ID + */ + public $socid; + + /** + * Invoice date (date) + * + * @var integer + */ + public $date; + + public $cond_reglement_id; // Id in llx_c_paiement + public $cond_reglement_code; // Code in llx_c_paiement + public $cond_reglement_label; + public $cond_reglement_doc; // Code in llx_c_paiement + + public $mode_reglement_id; + public $mode_reglement_code; // Code in llx_c_paiement + + public $totalpaid; // duplicate with sumpayed + public $totaldeposits; // duplicate with sumdeposit + public $totalcreditnotes; // duplicate with sumcreditnote + + public $sumpayed; + public $sumpayed_multicurrency; + public $sumdeposit; + public $sumdeposit_multicurrency; + public $sumcreditnote; + public $sumcreditnote_multicurrency; + public $remaintopay; + + /** + * ! Closing after partial payment: discount_vat, badsupplier, abandon + * ! Closing when no payment: replaced, abandoned + * @var string Close code + */ + public $close_code; + + /** + * ! Comment if paid without full payment + * @var string Close note + */ + public $close_note; + + /** * Standard invoice */ @@ -103,18 +149,6 @@ abstract class CommonInvoice extends CommonObject const STATUS_ABANDONED = 3; - public $totalpaid; // duplicate with sumpayed - public $totaldeposits; // duplicate with sumdeposit - public $totalcreditnotes; // duplicate with sumcreditnote - - public $sumpayed; - public $sumpayed_multicurrency; - public $sumdeposit; - public $sumdeposit_multicurrency; - public $sumcreditnote; - public $sumcreditnote_multicurrency; - public $remaintopay; - /** * Return remain amount to pay. Property ->id and ->total_ttc must be set. diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index acf2ffbf4cf..a6ecbb7f7d4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6156,6 +6156,11 @@ abstract class CommonObject //var_dump('key '.$key.' '.$value.' type='.$extrafields->attributes[$this->table_element]['type'][$key].' '.$this->array_options["options_".$key]); } + if (!empty($extrafields->attributes[$this->table_element]['type'][$key]) && $extrafields->attributes[$this->table_element]['type'][$key] == 'password') { + if (preg_match('/^dolcrypt:/', $value)) { + $this->array_options["options_".$key] = dolDecrypt($value); + } + } } } @@ -6348,17 +6353,25 @@ abstract class CommonObject if (isset($this->oldcopy->array_options[$key]) && $this->array_options[$key] == $this->oldcopy->array_options[$key]) { // If old value crypted in database is same than submited new value, it means we don't change it, so we don't update. $new_array_options[$key] = $this->array_options[$key]; // Value is kept } else { - // var_dump($algo); - $newvalue = dol_hash($this->array_options[$key], $algo); - $new_array_options[$key] = $newvalue; + if ($algo == 'dolcrypt') { // dolibarr reversible encryption + if (!preg_match('/^dolcrypt:/', $this->array_options[$key])) { + $new_array_options[$key] = dolEncrypt($this->array_options[$key]); + } else { + $new_array_options[$key] = $this->array_options[$key]; // Value is kept + } + } else { + $newvalue = dol_hash($this->array_options[$key], $algo); + $new_array_options[$key] = $newvalue; + } } } else { $new_array_options[$key] = $this->array_options[$key]; // Value is kept } + } else { + $new_array_options[$key] = $this->array_options[$key]; // Value is kept } - } else // Common usage - { - $new_array_options[$key] = $this->array_options[$key]; + } else { // Common usage + $new_array_options[$key] = $this->array_options[$key]; // Value is kept } break; case 'date': @@ -6650,10 +6663,12 @@ abstract class CommonObject $value = $this->array_options["options_".$key]; + $attributeKey = $key; $attributeType = $extrafields->attributes[$this->table_element]['type'][$key]; $attributeLabel = $extrafields->attributes[$this->table_element]['label'][$key]; $attributeParam = $extrafields->attributes[$this->table_element]['param'][$key]; $attributeRequired = $extrafields->attributes[$this->table_element]['required'][$key]; + $attributeUnique = $extrafields->attributes[$this->table_element]['unique'][$attributeKey]; $attrfieldcomputed = $extrafields->attributes[$this->table_element]['computed'][$key]; // Similar code than into insertExtraFields @@ -6716,6 +6731,44 @@ abstract class CommonObject case 'price': $this->array_options["options_".$key] = price2num($this->array_options["options_".$key]); break; + case 'password': + $new_array_options = array(); + $algo = ''; + if ($this->array_options[$key] != '' && is_array($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options'])) { + // If there is an encryption choice, we use it to crypt data before insert + $tmparrays = array_keys($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options']); + $algo = reset($tmparrays); + if ($algo != '') { + //global $action; // $action may be 'create', 'update', 'update_extras'... + //var_dump($action); + //var_dump($this->oldcopy);exit; + if (is_object($this->oldcopy)) { // If this->oldcopy is not defined, we can't know if we change attribute or not, so we must keep value + //var_dump($this->oldcopy->array_options[$key]); var_dump($this->array_options[$key]); + if (isset($this->oldcopy->array_options[$key]) && $this->array_options[$key] == $this->oldcopy->array_options[$key]) { // If old value crypted in database is same than submited new value, it means we don't change it, so we don't update. + $new_array_options[$key] = $this->array_options[$key]; // Value is kept + } else { + if ($algo == 'dolcrypt') { // dolibarr reversible encryption + if (!preg_match('/^dolcrypt:/', $this->array_options[$key])) { + $new_array_options[$key] = dolEncrypt($this->array_options[$key]); + } else { + $new_array_options[$key] = $this->array_options[$key]; // Value is kept + } + } else { + $newvalue = dol_hash($this->array_options[$key], $algo); + $new_array_options[$key] = $newvalue; + } + } + } else { + $new_array_options[$key] = $this->array_options[$key]; // Value is kept + } + } else { + $new_array_options[$key] = $this->array_options[$key]; // Value is kept + } + } else { // Common usage + $new_array_options[$key] = $this->array_options[$key]; // Value is kept + } + $this->array_options["options_".$key] = $new_array_options[$key]; + break; case 'date': case 'datetime': if (empty($this->array_options["options_".$key])) { diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index be62629afbc..bffb631ba2e 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -596,7 +596,7 @@ class ExtraFields $lengthdb = '11'; } elseif ($type == 'password') { $typedb = 'varchar'; - $lengthdb = '50'; + $lengthdb = '128'; } else { $typedb = $type; $lengthdb = $length; diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 608475d803a..ac361ca25d4 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -354,7 +354,7 @@ class Fiscalyear extends CommonObject if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/core/class/timespent.class.php b/htdocs/core/class/timespent.class.php index af7a15bbdc4..669a6929988 100755 --- a/htdocs/core/class/timespent.class.php +++ b/htdocs/core/class/timespent.class.php @@ -763,7 +763,7 @@ class TimeSpent extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($url && $add_save_lastsearch_values) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 29b47a624b3..eb2e32a33d5 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -490,14 +490,14 @@ function getBrowserInfo($user_agent) */ function dol_shutdown() { - global $user, $langs, $db; + global $db; $disconnectdone = false; $depth = 0; if (is_object($db) && !empty($db->connected)) { $depth = $db->transaction_opened; $disconnectdone = $db->close(); } - dol_syslog("--- End access to ".$_SERVER["PHP_SELF"].(($disconnectdone && $depth) ? ' (Warn: db disconnection forced, transaction depth was '.$depth.')' : ''), (($disconnectdone && $depth) ? LOG_WARNING : LOG_INFO)); + dol_syslog("--- End access to ".(empty($_SERVER["PHP_SELF"]) ? 'unknown' : $_SEVER["PHP_SELF"]).(($disconnectdone && $depth) ? ' (Warn: db disconnection forced, transaction depth was '.$depth.')' : ''), (($disconnectdone && $depth) ? LOG_WARNING : LOG_INFO)); } /** @@ -635,7 +635,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null } if (empty($method) || $method == 3 || $method == 4) { - $relativepathstring = $_SERVER["PHP_SELF"]; + $relativepathstring = (empty($_SERVER["PHP_SELF"]) ? '' : $_SERVER["PHP_SELF"]); // Clean $relativepathstring if (constant('DOL_URL_ROOT')) { $relativepathstring = preg_replace('/^'.preg_quote(constant('DOL_URL_ROOT'), '/').'/', '', $relativepathstring); @@ -2795,11 +2795,11 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs = // Analyze date $reg = array(); if (preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$/i', $time, $reg)) { // Deprecated. Ex: 1970-01-01, 1970-01-01 01:00:00, 19700101010000 - dol_print_error('', "Functions.lib::dol_print_date function called with a bad value from page ".$_SERVER["PHP_SELF"]); + dol_print_error('', "Functions.lib::dol_print_date function called with a bad value from page ".(empty($_SERVER["PHP_SELF"]) ? 'unknown' : $_SERVER["PHP_SELF"])); return ''; } elseif (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i', $time, $reg)) { // Still available to solve problems in extrafields of type date // This part of code should not be used anymore. - dol_syslog("Functions.lib::dol_print_date function called with a bad value from page ".$_SERVER["PHP_SELF"], LOG_WARNING); + dol_syslog("Functions.lib::dol_print_date function called with a bad value from page ".(empty($_SERVER["PHP_SELF"]) ? 'unknown' : $_SERVER["PHP_SELF"]), LOG_WARNING); //if (function_exists('debug_print_backtrace')) debug_print_backtrace(); // Date has format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' $syear = (!empty($reg[1]) ? $reg[1] : ''); diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 0a2d2572889..583f61b88f5 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -111,8 +111,8 @@ function dolGetRandomBytes($length) * Note: If a backup is restored onto another instance with a different $conf->file->instance_unique_id, then decoded value will differ. * This function is called for example by dol_set_const() when saving a sensible data into database configuration table llx_const. * - * @param string $chain string to encode - * @param string $key If '', we use $conf->file->instance_unique_id + * @param string $chain String to encode + * @param string $key If '', we use $conf->file->instance_unique_id (so $dolibarr_main_instance_unique_id in conf.php) * @param string $ciphering Default ciphering algorithm * @param string $forceseed To force the seed * @return string encoded string diff --git a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php index 7a27ab7182c..b6ec5c85be6 100644 --- a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php +++ b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php @@ -145,7 +145,7 @@ class doc_generic_asset_odt extends ModelePDFAsset $texte .= getDolGlobalString('ASSET_ASSET_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/asset/mod_asset_advanced.php b/htdocs/core/modules/asset/mod_asset_advanced.php index 369cca5db68..ff39d1e2613 100644 --- a/htdocs/core/modules/asset/mod_asset_advanced.php +++ b/htdocs/core/modules/asset/mod_asset_advanced.php @@ -81,7 +81,7 @@ class mod_asset_advanced extends ModeleNumRefAsset $text .= ''; $text .= ''; - $text .= ''; + $text .= ''; $text .= ''; diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index b1775a1e95f..99176dd00f2 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -109,7 +109,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode //$texte.= ''; $texte .= ''; $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= '
'.$langs->trans("Parameter").''.$langs->trans("Value").''.$langs->trans("Value").'
'; print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; -print '
'; +print ''; print ''; print '
'.$langs->trans("HideClosedServiceByDefault").''; +print ''; print $form->selectyesno("activate_hideClosedServiceByDefault", (!empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) ? $conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT : 0), 1); print '
'.$langs->trans("AllowOnlineSign").''; +print ''; if (getDolGlobalString('CONTRACT_ALLOW_ONLINESIGN')) { print ''; print img_picto($langs->trans("Activited"), 'switch_on'); @@ -533,7 +533,7 @@ print '
'.$langs->trans("AllowExternalDownload").''; +print ''; print ajax_constantonoff('CONTRACT_ALLOW_EXTERNAL_DOWNLOAD', array(), null, 0, 0, 0, 2, 0, 1); print '
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).'   
'.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).'   
'; diff --git a/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php index 6eae8da2c1f..c2e73d2d78f 100644 --- a/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php @@ -110,7 +110,7 @@ class mod_barcode_thirdparty_standard extends ModeleNumRefBarCode //$texte.= ''.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):'; $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php index 1eb59dda78e..219c1fd0873 100644 --- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php +++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php @@ -141,7 +141,7 @@ class doc_generic_bom_odt extends ModelePDFBom $texte .= getDolGlobalString('BOM_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories @@ -173,7 +173,7 @@ class doc_generic_bom_odt extends ModelePDFBom } $texte .= ' '; $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/bom/mod_bom_advanced.php b/htdocs/core/modules/bom/mod_bom_advanced.php index a1ffc9ff780..b8933a32504 100644 --- a/htdocs/core/modules/bom/mod_bom_advanced.php +++ b/htdocs/core/modules/bom/mod_bom_advanced.php @@ -82,7 +82,7 @@ class mod_bom_advanced extends ModeleNumRefBoms $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/bookcal/mod_booking_advanced.php b/htdocs/core/modules/bookcal/mod_booking_advanced.php index d34d08548f8..e1b8e2ad3fe 100644 --- a/htdocs/core/modules/bookcal/mod_booking_advanced.php +++ b/htdocs/core/modules/bookcal/mod_booking_advanced.php @@ -81,7 +81,7 @@ class mod_booking_advanced extends ModeleNumRefBooking // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index 79acb4b56a7..25100994aeb 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -76,7 +76,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= ' '; + $texte .= ' '; $texte .= ''; diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 2dc4f179b4b..476f649c5fb 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -148,7 +148,7 @@ class doc_generic_order_odt extends ModelePDFCommandes $texte .= getDolGlobalString('COMMANDE_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories @@ -180,7 +180,7 @@ class doc_generic_order_odt extends ModelePDFCommandes } $texte .= ' '; $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 641081782cd..65c48a657cc 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -82,7 +82,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index ed8f238342c..f1d10c1ce6b 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -145,7 +145,7 @@ class doc_generic_contract_odt extends ModelePDFContract $texte .= getDolGlobalString('CONTRACT_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories @@ -177,7 +177,7 @@ class doc_generic_contract_odt extends ModelePDFContract } $texte .= ' '; $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index 8deebdcffb5..4a3f97e7214 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -87,7 +87,7 @@ class mod_contract_magre extends ModelNumRefContracts $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/delivery/mod_delivery_saphir.php b/htdocs/core/modules/delivery/mod_delivery_saphir.php index 7faddbd2251..d25df47624d 100644 --- a/htdocs/core/modules/delivery/mod_delivery_saphir.php +++ b/htdocs/core/modules/delivery/mod_delivery_saphir.php @@ -86,7 +86,7 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 87e4d66f2e4..80ba1439342 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -148,7 +148,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $texte .= getDolGlobalString('EXPEDITION_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index eed9b96ffef..a90fc7c6653 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -82,7 +82,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index 669b51e22ed..b0aa791e228 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -86,7 +86,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport $mask = empty($conf->global->EXPENSEREPORT_SAND_MASK) ? '' : $conf->global->EXPENSEREPORT_SAND_MASK; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index aaa8bad5ee7..679548c3d72 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -147,7 +147,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures $texte .= getDolGlobalString('FACTURE_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index b4041eb7553..fb00fd6246f 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -80,7 +80,7 @@ class mod_facture_mercure extends ModeleNumRefFactures $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").'):'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index a2d7def3135..8f014e68111 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -87,7 +87,7 @@ class mod_arctic extends ModeleNumRefFicheinter $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 07e60ede935..954f33d8f2a 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -87,7 +87,7 @@ class mod_holiday_immaculate extends ModelNumRefHolidays $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/hrm/mod_evaluation_advanced.php b/htdocs/core/modules/hrm/mod_evaluation_advanced.php index 8bf3b201de6..71fb0024d93 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_advanced.php +++ b/htdocs/core/modules/hrm/mod_evaluation_advanced.php @@ -82,7 +82,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php index b87a2ce885f..9823db229c1 100644 --- a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php +++ b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php @@ -144,7 +144,7 @@ class doc_generic_member_odt extends ModelePDFMember $texte .= getDolGlobalString('MEMBER_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php index f76975c4645..f24f77cb946 100644 --- a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php +++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php @@ -147,7 +147,7 @@ class doc_generic_mo_odt extends ModelePDFMo $texte .= getDolGlobalString('MRP_MO_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/mrp/mod_mo_advanced.php b/htdocs/core/modules/mrp/mod_mo_advanced.php index 47cb69f1627..2fc5985cc84 100644 --- a/htdocs/core/modules/mrp/mod_mo_advanced.php +++ b/htdocs/core/modules/mrp/mod_mo_advanced.php @@ -83,7 +83,7 @@ class mod_mo_advanced extends ModeleNumRefMos $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index 0e689453a1e..6fe019dde3b 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -85,7 +85,7 @@ class mod_payment_ant extends ModeleNumRefPayments $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index 164ad6f5183..821aa6d8836 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -145,7 +145,7 @@ class doc_generic_product_odt extends ModelePDFProduct $texte .= getDolGlobalString('PRODUCT_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 17addbaedc7..a77ee4de156 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -119,7 +119,7 @@ class mod_codeproduct_elephant extends ModeleProductCode $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("ProductCodeModel").'):'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php index de173a93b8c..18c5cba5b46 100644 --- a/htdocs/core/modules/product_batch/mod_lot_advanced.php +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -86,7 +86,7 @@ class mod_lot_advanced extends ModeleNumRefBatch $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; // Option to enable custom masks per product $texte .= ''; diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php index 8b61a475603..fb6866742ff 100644 --- a/htdocs/core/modules/product_batch/mod_sn_advanced.php +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -86,7 +86,7 @@ class mod_sn_advanced extends ModeleNumRefBatch $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; // Option to enable custom masks per product $texte .= ''; diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 257dd9250d6..5ad570a3a35 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -441,7 +441,7 @@ class doc_generic_project_odt extends ModelePDFProjects $texte .= getDolGlobalInt('PROJECT_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index c75e3dcf385..4f2f5a421ae 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -91,7 +91,7 @@ class mod_project_universal extends ModeleNumRefProjects $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 74277cd8002..ed19b3a1370 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -406,7 +406,7 @@ class doc_generic_task_odt extends ModelePDFTask $texte .= getDolGlobalString('PROJECT_TASK_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index 6d060f6534d..add0de5d9e4 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -86,7 +86,7 @@ class mod_task_universal extends ModeleNumRefTask $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index d811d6c3b12..5a10e24333f 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -155,7 +155,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales $texte .= $odtPath; $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index fb5e4866a37..cfa06eb5f01 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -89,7 +89,7 @@ class mod_propale_saphir extends ModeleNumRefPropales $mask = empty($conf->global->PROPALE_SAPHIR_MASK) ? '' : $conf->global->PROPALE_SAPHIR_MASK; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 3efd800ef27..12b5e9094e6 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -142,7 +142,7 @@ class doc_generic_reception_odt extends ModelePdfReception $texte .= getDolGlobalString('RECEPTION_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php index d9c245556d7..b7ab238caec 100644 --- a/htdocs/core/modules/reception/mod_reception_moonstone.php +++ b/htdocs/core/modules/reception/mod_reception_moonstone.php @@ -63,7 +63,7 @@ class mod_reception_moonstone extends ModelNumRefReception $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index 76b37463e75..abcbb90877e 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -137,7 +137,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc $texte .= ''; $texte .= ''; $texte .= '  '; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index 100799dff95..c094086e46d 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -135,7 +135,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("CustomerCodeModel").'):'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index 3805feee4ce..f6eb46fa1b5 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -113,7 +113,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode $texte .= $langs->trans('COMPANY_AQUARIUM_NO_PREFIX').' = '.$conf->global->COMPANY_AQUARIUM_NO_PREFIX."
\n"; } $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/societe/mod_codecompta_digitaria.php b/htdocs/core/modules/societe/mod_codecompta_digitaria.php index 2ff2313c998..8590f4d95a4 100644 --- a/htdocs/core/modules/societe/mod_codecompta_digitaria.php +++ b/htdocs/core/modules/societe/mod_codecompta_digitaria.php @@ -127,7 +127,7 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode $texte .= $langs->trans('COMPANY_DIGITARIA_UNIQUE_CODE').' = '.yn(1)."
\n"; } $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index 21ae04ae946..fa7c0160eba 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -144,7 +144,7 @@ class doc_generic_stock_odt extends ModelePDFStock $texte .= getDolGlobalString('STOCK_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php index 3bd049792e4..8eac5b14f4b 100644 --- a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php +++ b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php @@ -83,7 +83,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php index 00e330cc9cd..56175353538 100644 --- a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php @@ -157,7 +157,7 @@ class doc_generic_supplier_invoice_odt extends ModelePDFSuppliersInvoices $texte .= getDolGlobalString('SUPPLIER_INVOICE_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories @@ -183,7 +183,7 @@ class doc_generic_supplier_invoice_odt extends ModelePDFSuppliersInvoices // Add input to upload a new template file. $texte .= '
'.$langs->trans("UploadNewTemplate").' '; $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= '
'; $texte .= ''; diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index dcb4deff292..3172a54711c 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -607,12 +607,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices /** * Show total to pay * - * @param TCPDF $pdf Object PDF - * @param Object $object Object invoice - * @param int $deja_regle Amount already paid (in the currency of invoice) - * @param int $posy Position depart - * @param Translate $outputlangs Objet langs - * @return int Position pour suite + * @param TCPDF $pdf Object PDF + * @param FactureFournisseur $object Object invoice + * @param int $deja_regle Amount already paid (in the currency of invoice) + * @param int $posy Position depart + * @param Translate $outputlangs Objet langs + * @return int Position of cursor after output */ protected function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs) { diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index cc3a2967471..f14a5df4605 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -96,7 +96,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices $texte .= ':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php index a4195c3218c..1d5f194e9ab 100644 --- a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php +++ b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php @@ -153,7 +153,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $texte .= getDolGlobalString('SUPPLIER_ORDER_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories @@ -179,7 +179,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders // Add input to upload a new template file. $texte .= '
'.$langs->trans("UploadNewTemplate").' '; $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= '
'; $texte .= ''; diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index c6985645288..9132d35c8a2 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -88,7 +88,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index fb980a4e038..7da2543ab00 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -85,7 +85,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 119d36160b6..32b6b64694a 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -154,7 +154,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $texte .= $odtPath; $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php index b9bdcb9f3e8..d876d5a6b12 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php @@ -1446,7 +1446,7 @@ class pdf_zenith extends ModelePDFSupplierProposal /** * Define Array Column Field * - * @param object $object common object + * @param Object $object common object * @param Translate $outputlangs langs * @param int $hidedetails Do not show line details * @param int $hidedesc Do not show desc @@ -1469,24 +1469,6 @@ class pdf_zenith extends ModelePDFSupplierProposal 'padding' => array(0.5, 0, 0.5, 0), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ); - /* - * For exemple - $this->cols['theColKey'] = array( - 'rank' => $rank, // int : use for ordering columns - 'width' => 20, // the column width in mm - 'title' => array( - 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label - 'label' => ' ', // the final label : used fore final generated text - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - 'content' => array( - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - ); - */ - $rank = 0; // do not use negative rank $this->cols['desc'] = array( 'rank' => $rank, diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 75817d8e773..4601d24c03a 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -90,7 +90,7 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php index b624332e0a6..35c7242368f 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php @@ -83,7 +83,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php index 4ad5757cc46..709085d544b 100644 --- a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php +++ b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php @@ -141,7 +141,7 @@ class doc_generic_ticket_odt extends ModelePDFTicket $texte .= getDolGlobalString('TICKET_ADDON_PDF_ODT_PATH'); $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index 643ee368bc5..15398b43f30 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -84,7 +84,7 @@ class mod_ticket_universal extends ModeleNumRefTicket $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 83d699b2124..cb1e28666e6 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -152,7 +152,7 @@ class doc_generic_user_odt extends ModelePDFUser $texte .= $odtPath; $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 17efb9a4731..7e91fa47419 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -154,7 +154,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $texte .= $odtPath; $texte .= ''; $texte .= '
'; - $texte .= ''; + $texte .= ''; $texte .= '
'; // Scan directories diff --git a/htdocs/core/modules/workstation/mod_workstation_advanced.php b/htdocs/core/modules/workstation/mod_workstation_advanced.php index 7dc6ddc3978..6695d26e64c 100644 --- a/htdocs/core/modules/workstation/mod_workstation_advanced.php +++ b/htdocs/core/modules/workstation/mod_workstation_advanced.php @@ -83,7 +83,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 13581de7e3c..bcc70dd15d2 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1057,7 +1057,7 @@ class Cronjob extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php index 9ad81450806..e188526ef58 100644 --- a/htdocs/delivery/class/delivery.class.php +++ b/htdocs/delivery/class/delivery.class.php @@ -786,7 +786,7 @@ class Delivery extends CommonObject //{ // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index aad080fad2b..0d9a9e043fd 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -930,7 +930,7 @@ class Don extends CommonObject $url = DOL_URL_ROOT.'/don/card.php?id='.$this->id; $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 5cb0b70811b..4eb3a749629 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -580,7 +580,7 @@ class EmailCollector extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index ec985238b82..07aea7feda8 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -295,7 +295,7 @@ class EmailCollectorAction extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/emailcollector/class/emailcollectorfilter.class.php b/htdocs/emailcollector/class/emailcollectorfilter.class.php index 807b16c951b..0bdb0294a27 100644 --- a/htdocs/emailcollector/class/emailcollectorfilter.class.php +++ b/htdocs/emailcollector/class/emailcollectorfilter.class.php @@ -309,7 +309,7 @@ class EmailCollectorFilter extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php index a7b173acc6c..ffd3b7d1604 100644 --- a/htdocs/eventorganization/class/conferenceorbooth.class.php +++ b/htdocs/eventorganization/class/conferenceorbooth.class.php @@ -536,7 +536,7 @@ class ConferenceOrBooth extends ActionComm if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index 11cbd811da8..f45066d3d11 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -780,7 +780,7 @@ class ConferenceOrBoothAttendee extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 9fc31148146..ccf5fed9d42 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1831,7 +1831,7 @@ class Expedition extends CommonObject if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 3147aaa129a..a3612453bea 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1778,7 +1778,7 @@ class ExpenseReport extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 43a8dac10b7..86d936416e0 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -829,7 +829,7 @@ class Fichinter extends CommonObject if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 9d9063db7e2..0df4c64d0b4 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -939,7 +939,7 @@ class CommandeFournisseur extends CommonOrder if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 597e3d668e6..252903ca7c6 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -117,8 +117,6 @@ class FactureFournisseur extends CommonInvoice */ public $label; - public $socid; - //Check constants for types public $type = self::TYPE_STANDARD; @@ -136,19 +134,6 @@ class FactureFournisseur extends CommonInvoice */ public $status; - /** - * ! Closing after partial payment: discount_vat, badsupplier, abandon - * ! Closing when no payment: replaced, abandoned - * @var string Close code - */ - public $close_code; - - /** - * ! Comment if paid without full payment - * @var string Close note - */ - public $close_note; - /** * Set to 1 if the invoice is completely paid, otherwise is 0 * @var int @@ -171,13 +156,6 @@ class FactureFournisseur extends CommonInvoice */ public $tms; - /** - * Invoice date (date) - * - * @var integer - */ - public $date; - /** * Max payment date (date_echeance) * @@ -222,19 +200,11 @@ class FactureFournisseur extends CommonInvoice public $note_public; public $propalid; - public $cond_reglement_id; - public $cond_reglement_code; - public $cond_reglement_label; - public $cond_reglement_doc; - /** * @var int ID */ public $fk_account; // default bank account - public $mode_reglement_id; - public $mode_reglement_code; - /** * @var int transport mode id */ @@ -2863,7 +2833,7 @@ class FactureFournisseur extends CommonInvoice if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 9c83f79e812..ba7508964dc 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -1264,7 +1264,7 @@ class ProductFournisseur extends Product if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index c66706a0598..f9007ea7a69 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1379,7 +1379,7 @@ class Holiday extends CommonObject //{ // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 0801f510f10..0c70b3b5014 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -456,7 +456,7 @@ class Establishment extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index d239b348578..b8f60a606e9 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -740,7 +740,7 @@ class Evaluation extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/hrm/class/evaluationdet.class.php b/htdocs/hrm/class/evaluationdet.class.php index 81984b00a88..acffaaa38c6 100644 --- a/htdocs/hrm/class/evaluationdet.class.php +++ b/htdocs/hrm/class/evaluationdet.class.php @@ -708,7 +708,7 @@ class EvaluationLine extends CommonObjectLine if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php index 4830c2b0dbc..c001c1cc002 100644 --- a/htdocs/hrm/class/job.class.php +++ b/htdocs/hrm/class/job.class.php @@ -740,7 +740,7 @@ class Job extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/hrm/class/position.class.php b/htdocs/hrm/class/position.class.php index 32fc5583ff3..9a9abf1216e 100644 --- a/htdocs/hrm/class/position.class.php +++ b/htdocs/hrm/class/position.class.php @@ -716,7 +716,7 @@ class Position extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index 20d1b477dfb..0a2ee71a972 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -783,7 +783,7 @@ class Skill extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/hrm/class/skilldet.class.php b/htdocs/hrm/class/skilldet.class.php index b389bbb716b..ad6b88ee0e0 100644 --- a/htdocs/hrm/class/skilldet.class.php +++ b/htdocs/hrm/class/skilldet.class.php @@ -696,7 +696,7 @@ class Skilldet extends CommonObjectLine if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php index cc0b51b2e8a..e2b0706422e 100644 --- a/htdocs/hrm/class/skillrank.class.php +++ b/htdocs/hrm/class/skillrank.class.php @@ -735,7 +735,7 @@ class SkillRank extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/includes/tecnickcom/tcpdf/tcpdf_autoconfig.php b/htdocs/includes/tecnickcom/tcpdf/tcpdf_autoconfig.php index 3cbace04b9b..3767b823442 100644 --- a/htdocs/includes/tecnickcom/tcpdf/tcpdf_autoconfig.php +++ b/htdocs/includes/tecnickcom/tcpdf/tcpdf_autoconfig.php @@ -44,7 +44,7 @@ if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) { if (isset($_SERVER['SCRIPT_FILENAME']) && isset($_SERVER['PHP_SELF'])) { $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF']))); - } elseif(isset($_SERVER['PATH_TRANSLATED'])) { + } elseif (isset($_SERVER['PATH_TRANSLATED']) && isset($_SERVER['PHP_SELF'])) { $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF']))); } else { // define here your DOCUMENT_ROOT path if the previous fails (e.g. '/var/www') diff --git a/htdocs/knowledgemanagement/class/knowledgerecord.class.php b/htdocs/knowledgemanagement/class/knowledgerecord.class.php index 2ec44165cff..67f9a6eacf4 100644 --- a/htdocs/knowledgemanagement/class/knowledgerecord.class.php +++ b/htdocs/knowledgemanagement/class/knowledgerecord.class.php @@ -789,7 +789,7 @@ class KnowledgeRecord extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index afa4341dfe9..3b9a78e20fe 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -458,7 +458,7 @@ ComputedFormula=Computed field ComputedFormulaDesc=You can enter here a formula using other properties of object or any PHP coding to get a dynamic computed value. You can use any PHP compatible formulas including the "?" condition operator, and following global object: $db, $conf, $langs, $mysoc, $user, $objectoffield.
WARNING: If you need properties of an object not loaded, just fetch yourself the object into your formula like in the second example.
Using a computed field means you can't enter yourself any value from interface. Also, if there is a syntax error, the formula may return nothing.

Example of formula:
$objectoffield->id < 10 ? round($objectoffield->id / 2, 2): ($objectoffield->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)

Example to reload object
(($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($objectoffield->id) > 0 ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1')

Other example of formula to force load of object and its parent object:
(($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($objectoffield->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Parent project not found' Computedpersistent=Store computed field ComputedpersistentDesc=Computed extra fields will be stored in the database, however, the value will only be recalculated when the object of this field is changed. If the computed field depends on other objects or global data this value might be wrong!! -ExtrafieldParamHelpPassword=Leaving this field blank means this value will be stored without encryption (field must be only hidden with star on screen).
Set 'auto' to use the default encryption rule to save password into database (then value read will be the hash only, no way to retrieve original value) +ExtrafieldParamHelpPassword=Leaving this field blank means this value will be stored WITHOUT encryption (field is just hidden with stars on screen).

Enter value 'dolcrypt' to encode value with a reversible encryption algorithm. Clear data can still be known and edited but is encrypted into database.

Enter 'auto' to use the default password encryption algorithm to save the password into database (the readable value will be the hash only, no way to retrieve original value) ExtrafieldParamHelpselect=List of values must be lines with format key,value (where key can't be '0')

for example:
1,value1
2,value2
code3,value3
...

In order to have the list depending on another complementary attribute list:
1,value1|options_parent_list_code:parent_key
2,value2|options_parent_list_code:parent_key

In order to have the list depending on another list:
1,value1|parent_list_code:parent_key
2,value2|parent_list_code:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

for example:
1,value1
2,value2
3,value3
... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

for example:
1,value1
2,value2
3,value3
... @@ -2407,4 +2407,6 @@ AllowOnLineSign=Allow On Line signature AtBottomOfPage=At bottom of page FailedAuth=failed authentications MaxNumberOfFailedAuth=Max number of failed authentication in 24h to deny login. -AllowPasswordResetBySendingANewPassByEmail=If a user A has this permission, and if the user A is not an "admin" user is allowed to reset the password of any other user B, the new password will be send to the email of the other user B but it won't be visible to A. If the user A has the "admin" flag, he will also be able to know what is the new generated password of B so he will be able to take control of the B user account. \ No newline at end of file +AllowPasswordResetBySendingANewPassByEmail=If a user A has this permission, and if the user A is not an "admin" user is allowed to reset the password of any other user B, the new password will be send to the email of the other user B but it won't be visible to A. If the user A has the "admin" flag, he will also be able to know what is the new generated password of B so he will be able to take control of the B user account. +ThisValueCanBeReadBecauseInstanceIsNotInProductionMode=This value can be read because your instance is not set in production mode +SeeConfFile=See inside conf.php file on the server \ No newline at end of file diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index decf76d7e8a..45593dd624e 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -559,7 +559,7 @@ class Loan extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index bd02374a24c..df60cb31f01 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -635,7 +635,7 @@ class PaymentLoan extends CommonObject $url = DOL_URL_ROOT.'/loan/payment/card.php?id='.$this->id; $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 5b3be07105c..69cb712d7fa 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -816,7 +816,7 @@ class MyObject extends CommonObject if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($url && $add_save_lastsearch_values) { diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index c64f84d72e8..ae404fbf9ff 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1250,7 +1250,7 @@ class Mo extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 18213acdb89..c0ef012fed7 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -484,7 +484,7 @@ class Opensurveysondage extends CommonObject // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php index 871ddfaff2d..e86b0750ff0 100644 --- a/htdocs/partnership/class/partnership.class.php +++ b/htdocs/partnership/class/partnership.class.php @@ -1009,7 +1009,7 @@ class Partnership extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/partnership/class/partnership_type.class.php b/htdocs/partnership/class/partnership_type.class.php index 473131e323f..b6d0f3dec70 100644 --- a/htdocs/partnership/class/partnership_type.class.php +++ b/htdocs/partnership/class/partnership_type.class.php @@ -285,7 +285,7 @@ class PartnershipType extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($url && $add_save_lastsearch_values) { diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 637dcf8cd18..089f2d43445 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -5232,7 +5232,7 @@ class Product extends CommonObject if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/product/class/productfournisseurprice.class.php b/htdocs/product/class/productfournisseurprice.class.php index 428c44722d6..8900f769ef5 100644 --- a/htdocs/product/class/productfournisseurprice.class.php +++ b/htdocs/product/class/productfournisseurprice.class.php @@ -589,8 +589,12 @@ class ProductFournisseurPrice extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; - if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + $add_save_lastsearch_values = 1; + } + if ($add_save_lastsearch_values) { + $url .= '&save_lastsearch_values=1'; + } } $linkclose = ''; diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index f43b76f843e..1139bc66f94 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -791,7 +791,7 @@ class Entrepot extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index ba38a96c220..28adb3efbed 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -1012,7 +1012,7 @@ class Productlot extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php index 4ee4ddee56e..6d29d5e34e6 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php @@ -726,8 +726,12 @@ class StockTransfer extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; - if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + $add_save_lastsearch_values = 1; + } + if ($add_save_lastsearch_values) { + $url .= '&save_lastsearch_values=1'; + } } $linkclose = ''; diff --git a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php index 9e605b00c34..d97f782498f 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php @@ -721,8 +721,12 @@ class StockTransferLine extends CommonObjectLine if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; - if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + $add_save_lastsearch_values = 1; + } + if ($add_save_lastsearch_values) { + $url .= '&save_lastsearch_values=1'; + } } $linkclose = ''; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 106d092c5ee..8d8b7b4147a 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1358,7 +1358,7 @@ class Project extends CommonObject } // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 51b4d3e68e1..45c7c12f487 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -800,7 +800,7 @@ class Task extends CommonObjectLine $url = DOL_URL_ROOT.'/projet/tasks/'.$mode.'.php?id='.$this->id.($option == 'withproject' ? '&withproject=1' : ''); // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 858e58f3b3a..1e7d676c9fc 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -732,7 +732,7 @@ class RecruitmentCandidature extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index a934834665f..450c6f45896 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -807,7 +807,7 @@ class RecruitmentJobPosition extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 8d8ae0474bf..0a571d2650f 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -826,7 +826,7 @@ class Dolresource extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/salaries/class/paymentsalary.class.php b/htdocs/salaries/class/paymentsalary.class.php index 79adb9bff9b..bcc00765cf3 100644 --- a/htdocs/salaries/class/paymentsalary.class.php +++ b/htdocs/salaries/class/paymentsalary.class.php @@ -764,7 +764,7 @@ class PaymentSalary extends CommonObject if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($url && $add_save_lastsearch_values) { diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php index 5a114def6f1..f41c4c09283 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -526,7 +526,7 @@ class Salary extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index 2397e00899e..6fc7f6d4e2e 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -390,7 +390,7 @@ class CompanyPaymentMode extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index ff465fcb8f7..5cd412be159 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2907,7 +2907,7 @@ class Societe extends CommonObject $linkstart .= (!empty($this->canvas) ? '&canvas='.$this->canvas : ''); // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 4d4fdc012d8..d3109dcda54 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -417,7 +417,7 @@ class SocieteAccount extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index dba68f99190..9b9c65c07d2 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -2549,7 +2549,7 @@ class SupplierProposal extends CommonObject if ($option !== 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/ticket/class/cticketcategory.class.php b/htdocs/ticket/class/cticketcategory.class.php index 5fe39fe4660..38a4214f2b6 100644 --- a/htdocs/ticket/class/cticketcategory.class.php +++ b/htdocs/ticket/class/cticketcategory.class.php @@ -518,7 +518,7 @@ class CTicketCategory extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 70790fb9b5f..d7adadc4d08 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1553,7 +1553,7 @@ class Ticket extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 5b6009f54e7..8aa1df2e366 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2911,7 +2911,7 @@ class User extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 81a44bd3aec..3e42682f55b 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -835,7 +835,7 @@ class UserGroup extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/variants/class/ProductAttribute.class.php b/htdocs/variants/class/ProductAttribute.class.php index 2e6d48b8abb..1c8e79e824d 100644 --- a/htdocs/variants/class/ProductAttribute.class.php +++ b/htdocs/variants/class/ProductAttribute.class.php @@ -1134,7 +1134,7 @@ class ProductAttribute extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($url && $add_save_lastsearch_values) { diff --git a/htdocs/webhook/class/target.class.php b/htdocs/webhook/class/target.class.php index 2adb8f3f24c..1eeade02d17 100644 --- a/htdocs/webhook/class/target.class.php +++ b/htdocs/webhook/class/target.class.php @@ -714,7 +714,7 @@ class Target extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($url && $add_save_lastsearch_values) { diff --git a/htdocs/workstation/class/workstation.class.php b/htdocs/workstation/class/workstation.class.php index 097ef6cf2ff..1367f9af5ee 100644 --- a/htdocs/workstation/class/workstation.class.php +++ b/htdocs/workstation/class/workstation.class.php @@ -622,7 +622,7 @@ class Workstation extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/htdocs/zapier/class/hook.class.php b/htdocs/zapier/class/hook.class.php index d63271ce54e..d027cfb3710 100644 --- a/htdocs/zapier/class/hook.class.php +++ b/htdocs/zapier/class/hook.class.php @@ -521,7 +521,7 @@ class Hook extends CommonObject if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index 6ef14f7a227..c99368a78fe 100644 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -196,11 +196,11 @@ class LangTest extends PHPUnit\Framework\TestCase $result=$tmplangs->transnoentitiesnoconv("SeparatorDecimal"); print __METHOD__." SeparatorDecimal=".$result."\n"; - $this->assertContains($result, array('.',',','/',' ','','None'), 'Error on decimal separator for lang code '.$code); // Note that ، that is coma for RTL languages is not supported + $this->assertTrue(in_array($result, array('.',',','/',' ','','None')), 'Error on decimal separator for lang code '.$code); // Note that ، that is coma for RTL languages is not supported $result=$tmplangs->transnoentitiesnoconv("SeparatorThousand"); print __METHOD__." SeparatorThousand=".$result."\n"; - $this->assertContains($result, array('.',',','/',' ','','\'','None','Space'), 'Error on thousand separator for lang code '.$code); // Note that ، that is coma for RTL languages is not supported + $this->assertTrue(in_array($result, array('.',',','/',' ','','\'','None','Space')), 'Error on thousand separator for lang code '.$code); // Note that ، that is coma for RTL languages is not supported // Test java string contains only d,M,y,/,-,. and not m,... $result=$tmplangs->transnoentitiesnoconv("FormatDateShortJava"); diff --git a/test/phpunit/SocieteTest.php b/test/phpunit/SocieteTest.php index 96d2071ce7d..ce086f179cc 100644 --- a/test/phpunit/SocieteTest.php +++ b/test/phpunit/SocieteTest.php @@ -462,7 +462,7 @@ class SocieteTest extends PHPUnit\Framework\TestCase $localobjectadd->town='New town'; $result=$localobjectadd->getFullAddress(1); print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; - $this->assertContains("New address\nNew zip New town\nFrance", $result); + $this->assertStringContainsString("New address\nNew zip New town\nFrance", $result); // Belgium unset($localobjectadd->country_code); @@ -473,7 +473,7 @@ class SocieteTest extends PHPUnit\Framework\TestCase $localobjectadd->town='New town'; $result=$localobjectadd->getFullAddress(1); print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; - $this->assertContains("New address\nNew zip New town\nBelgium", $result); + $this->assertStringContainsString("New address\nNew zip New town\nBelgium", $result); // Switzerland unset($localobjectadd->country_code); @@ -484,7 +484,7 @@ class SocieteTest extends PHPUnit\Framework\TestCase $localobjectadd->town='New town'; $result=$localobjectadd->getFullAddress(1); print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; - $this->assertContains("New address\nNew zip New town\nSwitzerland", $result); + $this->assertStringContainsString("New address\nNew zip New town\nSwitzerland", $result); // USA unset($localobjectadd->country_code); @@ -496,7 +496,7 @@ class SocieteTest extends PHPUnit\Framework\TestCase $localobjectadd->state='New state'; $result=$localobjectadd->getFullAddress(1); print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; - $this->assertContains("New address\nNew town, New state, New zip\nUnited States", $result); + $this->assertStringContainsString("New address\nNew town, New state, New zip\nUnited States", $result); return $localobjectadd->id; } diff --git a/test/phpunit/functional/InstallTest.php b/test/phpunit/functional/InstallTest.php index f1ecdc60914..315749aa76d 100644 --- a/test/phpunit/functional/InstallTest.php +++ b/test/phpunit/functional/InstallTest.php @@ -104,7 +104,7 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase public function testInstallRedirect() { $this->url('/'); - $this->assertContains('/install/index.php', $this->url()); + $this->assertStringContainsString('/install/index.php', $this->url()); } /** @@ -114,7 +114,7 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase */ public function testInstallPageTitle() { - $this->assertContains('Dolibarr', $this->title()); + $this->assertStringContainsString('Dolibarr', $this->title()); } /** @@ -126,7 +126,7 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase { // FIXME: the button itself should have an ID $this->byId('nextbutton')->byTag('input')->click(); - $this->assertContains('/install/check.php', $this->url()); + $this->assertStringContainsString('/install/check.php', $this->url()); } /** @@ -145,7 +145,7 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase $show_hide_choices->click(); $this->assertFalse($unavailable_choices->displayed()); $this->byClassName('button')->click(); - $this->assertContains('/install/fileconf.php', $this->url()); + $this->assertStringContainsString('/install/fileconf.php', $this->url()); } /** @@ -205,7 +205,7 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase public function testFormSubmit() { $this->byName('forminstall')->submit(); - $this->assertContains('/install/step1.php', $this->url()); + $this->assertStringContainsString('/install/step1.php', $this->url()); } /** @@ -221,7 +221,7 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase $this->byId('nextbutton')->byTag('input')->click(); $time = $start->diff(new DateTimeImmutable()); echo "\nPopulating the database took " . $time->format("%s seconds.\n"); - $this->assertContains('/install/step2.php', $this->url()); + $this->assertStringContainsString('/install/step2.php', $this->url()); } /** @@ -232,7 +232,7 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase public function testStep2() { $this->byName('forminstall')->submit(); - $this->assertContains('/install/step4.php', $this->url()); + $this->assertStringContainsString('/install/step4.php', $this->url()); } // There is no step 3 @@ -252,7 +252,7 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase $this->byName('pass_verif')->value(self::$dol_admin_pass); // FIXME: the button itself should have an ID $this->byId('nextbutton')->byTag('input')->click(); - $this->assertContains('/install/step5.php', $this->url()); + $this->assertStringContainsString('/install/step5.php', $this->url()); } /** @@ -264,7 +264,7 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase { // FIXME: this button should have an ID $this->byTag('a')->click(); - $this->assertContains('/admin/index.php', $this->url()); + $this->assertStringContainsString('/admin/index.php', $this->url()); } /** diff --git a/test/phpunit/functional/TakePosFunctionalTest.php b/test/phpunit/functional/TakePosFunctionalTest.php index 3cb46a04fdf..3ff050f8403 100644 --- a/test/phpunit/functional/TakePosFunctionalTest.php +++ b/test/phpunit/functional/TakePosFunctionalTest.php @@ -192,7 +192,7 @@ class TakePosFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase } // Page reloaded, we need a new Xpath $module_status_image = $this->byXPath($module_status_image_path); - $this->assertContains('switch_on.png', $module_status_image->attribute('src'), "Module enabled"); + $this->assertStringContainsString('switch_on.png', $module_status_image->attribute('src'), "Module enabled"); } /** @@ -206,7 +206,7 @@ class TakePosFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase { $this->url('/custom/takepos/admin/setup.php'); $this->authenticate(); - $this->assertContains('takepos/admin/setup.php', $this->url(), 'Configuration page'); + $this->assertStringContainsString('takepos/admin/setup.php', $this->url(), 'Configuration page'); } /** @@ -220,7 +220,7 @@ class TakePosFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase { $this->url('/custom/takepos/admin/about.php'); $this->authenticate(); - $this->assertContains('takepos/admin/about.php', $this->url(), 'About page'); + $this->assertStringContainsString('takepos/admin/about.php', $this->url(), 'About page'); } /** @@ -252,7 +252,7 @@ class TakePosFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase { $this->url('/admin/boxes.php'); $this->authenticate(); - $this->assertContains('takeposwidget1', $this->source(), "Box enabled"); + $this->assertStringContainsString('takeposwidget1', $this->source(), "Box enabled"); } /** @@ -266,7 +266,7 @@ class TakePosFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase { $this->url('/admin/triggers.php'); $this->authenticate(); - $this->assertContains( + $this->assertStringContainsString( 'interface_99_modTakePos_TakePosTriggers.class.php', $this->byTag('body')->text(), "Trigger declared" @@ -284,7 +284,7 @@ class TakePosFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase { $this->url('/admin/triggers.php'); $this->authenticate(); - $this->assertContains( + $this->assertStringContainsString( 'tick.png', $this->byXPath('//td[text()="interface_99_modTakePos_MyTrigger.class.php"]/following::img')->attribute('src'), "Trigger enabled"