From 3dfb4aae18d9bd3ca1c3476a4515755ad298c7f9 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Fri, 5 May 2023 18:02:49 +0200 Subject: [PATCH 01/11] NEW - Hook infoadmin --- htdocs/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/index.php b/htdocs/index.php index 8fe8ffa377e..361de385a20 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -130,7 +130,10 @@ if (empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) { //if (!empty($message)) $message.='
'; $message .= info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly").' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth'); } - + $reshook = $hookmanager->executeHooks('infoadmin', $action); // Note that $action and $object may have been modified by some hooks + if ($reshook == 0) { + $message .= $hookmanager->resPrint; + } if ($message) { print $message.'
'; //$message.='
'; From db6b8c60fd740d737deb459230d823d9dc755f79 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 17 May 2023 18:09:52 +0200 Subject: [PATCH 02/11] add constant to print invoice --- htdocs/takepos/invoice.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index c1c5b8aeccd..0880ebd5f21 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -898,7 +898,9 @@ if (empty($reshook)) { } } $sectionwithinvoicelink .= '
'; - if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") { + if (getDolGlobalString('TAKEPOS_PRINT_INVOICE')) { + $sectionwithinvoicelink .= ' Invoice'; + } elseif (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") { if (getDolGlobalString('TAKEPOS_PRINT_SERVER') && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) { $sectionwithinvoicelink .= ' '; } else { @@ -1686,6 +1688,9 @@ print ''; if (($action == "valid" || $action == "history") && $invoice->type != Facture::TYPE_CREDIT_NOTE) { print ''; + if (getDolGlobalString('TAKEPOS_PRINT_INVOICE')) { + print ' Invoice'; + } } From aeb88405aa4ae12294b8c53cb5ed37fe407894c3 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Sun, 21 May 2023 19:07:12 +0200 Subject: [PATCH 03/11] fix --- htdocs/takepos/invoice.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 0880ebd5f21..a60bc358a92 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -898,7 +898,7 @@ if (empty($reshook)) { } } $sectionwithinvoicelink .= '
'; - if (getDolGlobalString('TAKEPOS_PRINT_INVOICE')) { + if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE')) { $sectionwithinvoicelink .= ' Invoice'; } elseif (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") { if (getDolGlobalString('TAKEPOS_PRINT_SERVER') && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) { @@ -1688,7 +1688,7 @@ print ''; if (($action == "valid" || $action == "history") && $invoice->type != Facture::TYPE_CREDIT_NOTE) { print ''; - if (getDolGlobalString('TAKEPOS_PRINT_INVOICE')) { + if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE')) { print ' Invoice'; } } From 39fff532c21100e573b81d4bb3da05e224263235 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Mon, 22 May 2023 13:43:21 +0200 Subject: [PATCH 04/11] rename constant --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index a60bc358a92..5fca4dce7c0 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -898,7 +898,7 @@ if (empty($reshook)) { } } $sectionwithinvoicelink .= '
'; - if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE')) { + if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) { $sectionwithinvoicelink .= ' Invoice'; } elseif (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") { if (getDolGlobalString('TAKEPOS_PRINT_SERVER') && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) { From 77a8341c4e56c3061827d0620f85fb278293fa32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Courtier?= Date: Tue, 23 May 2023 16:58:20 +0200 Subject: [PATCH 05/11] NEW: Add Encryption and noRSH config on emailcollector object --- htdocs/admin/emailcollector_card.php | 4 +--- .../class/emailcollector.class.php | 21 ++++++++++--------- .../install/mysql/migration/17.0.0-18.0.0.sql | 5 +++++ .../llx_emailcollector_emailcollector.sql | 2 ++ htdocs/langs/fr_FR/admin.lang | 4 ++++ 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 452ae74d614..d8a79164e6f 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -395,9 +395,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $connectstringtarget = ''; // Note: $object->host has been loaded by the fetch - $usessl = 1; - - $connectstringserver = $object->getConnectStringIMAP($usessl); + $connectstringserver = $object->getConnectStringIMAP(); if ($action == 'scan') { if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 78e19dbca1c..13341b880ec 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -131,6 +131,8 @@ class EmailCollector extends CommonObject 'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>90, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com', 'csslist'=>'tdoverflowmax125'), 'port' => array('type'=>'varchar(10)', 'label'=>'EMailHostPort', 'visible'=>1, 'enabled'=>1, 'position'=>91, 'notnull'=>1, 'searchall'=>0, 'comment'=>"IMAP server port", 'help'=>'Example: 993', 'csslist'=>'tdoverflowmax50', 'default'=>'993'), 'hostcharset' => array('type'=>'varchar(16)', 'label'=>'HostCharset', 'visible'=>-1, 'enabled'=>1, 'position'=>92, 'notnull'=>0, 'searchall'=>0, 'comment'=>"IMAP server charset", 'help'=>'Example: "UTF-8" (May be "US-ASCII" with some Office365)', 'default'=>'UTF-8'), + 'imap_encryption' => array('type'=>'varchar(16)', 'label'=>'ImapEncryption', 'visible'=>1, 'enabled'=>1, 'position'=>93, 'searchall'=>0, 'comment'=>"IMAP encryption", 'help'=>'ImapEncryptionHelp', 'arrayofkeyval'=> array('ssl'=>'SSL', 'tls' => 'TLS', 'notls' => 'NOTLS'), 'default'=>'ssl'), + 'norsh' => array('type'=>'integer', 'label'=>'NoRSH', 'visible'=>1, 'enabled'=>"!getDolGlobalInt('MAIN_IMAP_USE_PHPIMAP')", 'position'=>94, 'searchall'=>0, 'help'=>'NoRSHHelp', 'arrayofkeyval'=> array(0 =>'No', 1 => 'Yes'), 'default'=> 0), 'acces_type' => array('type'=>'integer', 'label'=>'accessType', 'visible'=>-1, 'enabled'=>"getDolGlobalInt('MAIN_IMAP_USE_PHPIMAP')", 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login type", 'arrayofkeyval'=>array('0'=>'loginPassword', '1'=>'oauthToken'), 'default'=>'0', 'help'=>''), 'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'), 'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>"1", 'position'=>103, 'notnull'=>-1, 'comment'=>"IMAP password", 'help'=>'WithGMailYouCanCreateADedicatedPassword'), @@ -775,11 +777,9 @@ class EmailCollector extends CommonObject /** * Return the connectstring to use with IMAP connection function * - * @param int $ssl Add /ssl tag - * @param int $norsh Add /norsh to connectstring * @return string */ - public function getConnectStringIMAP($ssl = 1, $norsh = 0) + public function getConnectStringIMAP() { global $conf; @@ -787,15 +787,16 @@ class EmailCollector extends CommonObject $flags = '/service=imap'; // IMAP if (!empty($conf->global->IMAP_FORCE_TLS)) { $flags .= '/tls'; - } elseif (empty($conf->global->IMAP_FORCE_NOSSL)) { - if ($ssl) { - $flags .= '/ssl'; - } + } elseif (empty($this->imap_encryption) || ($this->imap_encryption == 'ssl' && !empty($conf->global->IMAP_FORCE_NOSSL))) { + $flags .= ''; + } else { + $flags .= '/' . $this->imap_encryption; } + $flags .= '/novalidate-cert'; //$flags.='/readonly'; //$flags.='/debug'; - if ($norsh || !empty($conf->global->IMAP_FORCE_NORSH)) { + if (!empty($this->norsh) || !empty($conf->global->IMAP_FORCE_NORSH)) { $flags .= '/norsh'; } //Used in shared mailbox from Office365 @@ -1191,7 +1192,7 @@ class EmailCollector extends CommonObject $client = $cm->make([ 'host' => $this->host, 'port' => $this->port, - 'encryption' => 'ssl', + 'encryption' => !empty($this->imap_encryption) ? $this->imap_encryption : false, 'validate_cert' => true, 'protocol' => 'imap', 'username' => $this->login, @@ -1204,7 +1205,7 @@ class EmailCollector extends CommonObject $client = $cm->make([ 'host' => $this->host, 'port' => $this->port, - 'encryption' => 'ssl', + 'encryption' => !empty($this->imap_encryption) ? $this->imap_encryption : false, 'validate_cert' => true, 'protocol' => 'imap', 'username' => $this->login, diff --git a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql index 5d72775f1b2..f7a513f788a 100644 --- a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql +++ b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql @@ -428,3 +428,8 @@ ALTER TABLE llx_c_stcomm ADD COLUMN sortorder smallint DEFAULT 0; ALTER TABLE llx_element_time ADD COLUMN ref_ext varchar(32); ALTER TABLE llx_c_ziptown ADD COLUMN town_up varchar(180); + + +-- Email Collector +ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN imap_encryption varchar(16) DEFAULT "ssl" AFTER hostcharset; +ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN norsh integer DEFAULT 0 AFTER imap_encryption; diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql index 4119e7aac08..080e9cd0533 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql @@ -24,6 +24,8 @@ CREATE TABLE llx_emailcollector_emailcollector( host varchar(255), port varchar(10) DEFAULT '993', hostcharset varchar(16) DEFAULT 'UTF-8', + imap_encryption varchar(16) DEFAULT 'ssl', + norsh integer DEFAULT 0, login varchar(128), acces_type integer DEFAULT 0, oauth_service varchar(128), diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 4fc55bfd30b..ba5184458f6 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -2108,6 +2108,10 @@ oauthToken=Jeton Oauth2 accessType=Type d'accès oauthService=Service Oauth TokenMustHaveBeenCreated=Le module OAuth2 doit être activé et un token oauth2 doit avoir été créé avec les bonnes permissions (par exemple scope "gmail_full" avec OAuth pour Gmail). +ImapEncryption = Méthode de chiffrement IMAP +ImapEncryptionHelp = Exemple: none, ssl, tls, notls +NoRSH = Utiliser la configuration NoRSH +NoRSHHelp = Ne pas utiliser les protocole RSH ou SSH pour établir une session de pré identification IMAP MailboxSourceDirectory=Répertoire source de la boîte aux lettres MailboxTargetDirectory=Répertoire cible de la boîte aux lettres EmailcollectorOperations=Opérations à effectuer par le collecteur From 961303e1cdb4a7c59a2668ac2addb7c47ae2127f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Courtier?= Date: Tue, 23 May 2023 17:04:24 +0200 Subject: [PATCH 06/11] NEW: Add en_US Translations --- htdocs/langs/en_US/admin.lang | 4 ++++ htdocs/langs/fr_FR/admin.lang | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 462b265f3d8..d0e48a2bff7 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2113,6 +2113,10 @@ oauthToken=Oauth2 token accessType=Acces type oauthService=Oauth service TokenMustHaveBeenCreated=Module OAuth2 must be enabled and an oauth2 token must have been created with the correct permissions (for example scope "gmail_full" with OAuth for Gmail). +ImapEncryption = IMAP encryption method +ImapEncryptionHelp = Example: none, ssl, tls, notls +NoRSH = Use the NoRSH configuration +NoRSHHelp = Do not use RSH or SSH protocols to establish an IMAP pre-identification session MailboxSourceDirectory=Mailbox source directory MailboxTargetDirectory=Mailbox target directory EmailcollectorOperations=Operations to do by collector diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index ba5184458f6..4fc55bfd30b 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -2108,10 +2108,6 @@ oauthToken=Jeton Oauth2 accessType=Type d'accès oauthService=Service Oauth TokenMustHaveBeenCreated=Le module OAuth2 doit être activé et un token oauth2 doit avoir été créé avec les bonnes permissions (par exemple scope "gmail_full" avec OAuth pour Gmail). -ImapEncryption = Méthode de chiffrement IMAP -ImapEncryptionHelp = Exemple: none, ssl, tls, notls -NoRSH = Utiliser la configuration NoRSH -NoRSHHelp = Ne pas utiliser les protocole RSH ou SSH pour établir une session de pré identification IMAP MailboxSourceDirectory=Répertoire source de la boîte aux lettres MailboxTargetDirectory=Répertoire cible de la boîte aux lettres EmailcollectorOperations=Opérations à effectuer par le collecteur From 890ad6f1df20487c5abf4312e1273651f8df96ac Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 23 May 2023 15:20:27 +0000 Subject: [PATCH 07/11] Fixing style errors. --- htdocs/emailcollector/class/emailcollector.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 13341b880ec..1ff11e51553 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -131,8 +131,8 @@ class EmailCollector extends CommonObject 'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>90, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com', 'csslist'=>'tdoverflowmax125'), 'port' => array('type'=>'varchar(10)', 'label'=>'EMailHostPort', 'visible'=>1, 'enabled'=>1, 'position'=>91, 'notnull'=>1, 'searchall'=>0, 'comment'=>"IMAP server port", 'help'=>'Example: 993', 'csslist'=>'tdoverflowmax50', 'default'=>'993'), 'hostcharset' => array('type'=>'varchar(16)', 'label'=>'HostCharset', 'visible'=>-1, 'enabled'=>1, 'position'=>92, 'notnull'=>0, 'searchall'=>0, 'comment'=>"IMAP server charset", 'help'=>'Example: "UTF-8" (May be "US-ASCII" with some Office365)', 'default'=>'UTF-8'), - 'imap_encryption' => array('type'=>'varchar(16)', 'label'=>'ImapEncryption', 'visible'=>1, 'enabled'=>1, 'position'=>93, 'searchall'=>0, 'comment'=>"IMAP encryption", 'help'=>'ImapEncryptionHelp', 'arrayofkeyval'=> array('ssl'=>'SSL', 'tls' => 'TLS', 'notls' => 'NOTLS'), 'default'=>'ssl'), - 'norsh' => array('type'=>'integer', 'label'=>'NoRSH', 'visible'=>1, 'enabled'=>"!getDolGlobalInt('MAIN_IMAP_USE_PHPIMAP')", 'position'=>94, 'searchall'=>0, 'help'=>'NoRSHHelp', 'arrayofkeyval'=> array(0 =>'No', 1 => 'Yes'), 'default'=> 0), + 'imap_encryption' => array('type'=>'varchar(16)', 'label'=>'ImapEncryption', 'visible'=>1, 'enabled'=>1, 'position'=>93, 'searchall'=>0, 'comment'=>"IMAP encryption", 'help'=>'ImapEncryptionHelp', 'arrayofkeyval'=> array('ssl'=>'SSL', 'tls' => 'TLS', 'notls' => 'NOTLS'), 'default'=>'ssl'), + 'norsh' => array('type'=>'integer', 'label'=>'NoRSH', 'visible'=>1, 'enabled'=>"!getDolGlobalInt('MAIN_IMAP_USE_PHPIMAP')", 'position'=>94, 'searchall'=>0, 'help'=>'NoRSHHelp', 'arrayofkeyval'=> array(0 =>'No', 1 => 'Yes'), 'default'=> 0), 'acces_type' => array('type'=>'integer', 'label'=>'accessType', 'visible'=>-1, 'enabled'=>"getDolGlobalInt('MAIN_IMAP_USE_PHPIMAP')", 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login type", 'arrayofkeyval'=>array('0'=>'loginPassword', '1'=>'oauthToken'), 'default'=>'0', 'help'=>''), 'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'), 'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>"1", 'position'=>103, 'notnull'=>-1, 'comment'=>"IMAP password", 'help'=>'WithGMailYouCanCreateADedicatedPassword'), From 4811192c9ecefe283b2b1ddcb9feb9fba57dae71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Courtier?= Date: Wed, 24 May 2023 09:43:02 +0200 Subject: [PATCH 08/11] FIX: Add property declaration --- htdocs/emailcollector/class/emailcollector.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 13341b880ec..b3cb18519b6 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -215,6 +215,8 @@ class EmailCollector extends CommonObject public $password; public $acces_type; public $oauth_service; + public $imap_encryption; + public $norsh; public $source_directory; public $target_directory; public $maxemailpercollect; From 342144d790ce97fc695def40b6cd8d37cbc9fcf0 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 24 May 2023 14:36:29 +0200 Subject: [PATCH 09/11] i am sometimes a little dumb --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 5fca4dce7c0..95230eb6b2b 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -1688,7 +1688,7 @@ print ''; if (($action == "valid" || $action == "history") && $invoice->type != Facture::TYPE_CREDIT_NOTE) { print ''; - if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE')) { + if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) { print ' Invoice'; } } From 1cb666ff9f4366b0ea78acf0e7948691cc800a02 Mon Sep 17 00:00:00 2001 From: Florent Poinsaut Date: Wed, 24 May 2023 14:41:57 +0200 Subject: [PATCH 10/11] Fix notify output dir supplier order --- htdocs/core/class/notify.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 5e12a30ba0e..dbda9947ae0 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -523,7 +523,7 @@ class Notify break; case 'ORDER_SUPPLIER_VALIDATE': $link = ''.$newref.''; - $dir_output = $conf->fournisseur->commande->dir_output; + $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object); $object_type = 'order_supplier'; $mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n"; $mesg .= $outputlangs->transnoentitiesnoconv("EMailTextOrderValidatedBy", $link, $user->getFullName($outputlangs)); @@ -531,7 +531,7 @@ class Notify break; case 'ORDER_SUPPLIER_APPROVE': $link = ''.$newref.''; - $dir_output = $conf->fournisseur->commande->dir_output; + $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object); $object_type = 'order_supplier'; $mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n"; $mesg .= $outputlangs->transnoentitiesnoconv("EMailTextOrderApprovedBy", $link, $user->getFullName($outputlangs)); @@ -539,7 +539,7 @@ class Notify break; case 'ORDER_SUPPLIER_REFUSE': $link = ''.$newref.''; - $dir_output = $conf->fournisseur->commande->dir_output; + $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object); $object_type = 'order_supplier'; $mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n"; $mesg .= $outputlangs->transnoentitiesnoconv("EMailTextOrderRefusedBy", $link, $user->getFullName($outputlangs)); @@ -763,7 +763,7 @@ class Notify break; case 'ORDER_SUPPLIER_VALIDATE': $link = ''.$newref.''; - $dir_output = $conf->fournisseur->commande->dir_output; + $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object); $object_type = 'order_supplier'; $mesg = $langs->transnoentitiesnoconv("Hello").",\n\n"; $mesg .= $langs->transnoentitiesnoconv("EMailTextOrderValidatedBy", $link, $user->getFullName($langs)); @@ -771,7 +771,7 @@ class Notify break; case 'ORDER_SUPPLIER_APPROVE': $link = ''.$newref.''; - $dir_output = $conf->fournisseur->commande->dir_output; + $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object); $object_type = 'order_supplier'; $mesg = $langs->transnoentitiesnoconv("Hello").",\n\n"; $mesg .= $langs->transnoentitiesnoconv("EMailTextOrderApprovedBy", $link, $user->getFullName($langs)); @@ -779,7 +779,7 @@ class Notify break; case 'ORDER_SUPPLIER_APPROVE2': $link = ''.$newref.''; - $dir_output = $conf->fournisseur->commande->dir_output; + $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object); $object_type = 'order_supplier'; $mesg = $langs->transnoentitiesnoconv("Hello").",\n\n"; $mesg .= $langs->transnoentitiesnoconv("EMailTextOrderApprovedBy", $link, $user->getFullName($langs)); From 9d34f9dba9e845c6c20a4ce650039decd39adba1 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Thu, 25 May 2023 12:30:52 +0200 Subject: [PATCH 11/11] FIX PHP 8 Warning in subscription list --- htdocs/adherents/subscription/list.php | 2 +- htdocs/core/tpl/list_print_total.tpl.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 9a2243f4fea..5060a0224b6 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -715,7 +715,7 @@ while ($i < $imaxinloop) { // Label if (!empty($arrayfields['t.libelle']['checked'])) { - print ''; + print ''; print dol_escape_htmltag(dolGetFirstLineOfText($obj->note_private)); print ''; if (!$i) { diff --git a/htdocs/core/tpl/list_print_total.tpl.php b/htdocs/core/tpl/list_print_total.tpl.php index d18349dd107..21f86a8f242 100644 --- a/htdocs/core/tpl/list_print_total.tpl.php +++ b/htdocs/core/tpl/list_print_total.tpl.php @@ -13,7 +13,7 @@ if (isset($totalarray['pos'])) { while ($i < $totalarray['nbfield']) { $i++; if (!empty($totalarray['pos'][$i])) { - switch ($totalarray['type'][$i]) { + switch ($totalarray['pos'][$i]) { case 'duration'; print ''; print (!empty($totalarray['val'][$totalarray['pos'][$i]]) ? convertSecondToTime($totalarray['val'][$totalarray['pos'][$i]], 'allhourmin') : 0);