From 39777d4cc5a589c2028bfb56d1a4f00296d36f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 1 Nov 2021 09:37:07 +0100 Subject: [PATCH 1/2] fix error --- htdocs/core/modules/printing/modules_printing.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/printing/modules_printing.php b/htdocs/core/modules/printing/modules_printing.php index 41a87cb2704..1bbf78df022 100644 --- a/htdocs/core/modules/printing/modules_printing.php +++ b/htdocs/core/modules/printing/modules_printing.php @@ -69,7 +69,7 @@ class PrintingDriver $listoffiles = array(); $dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']); foreach ($dirmodels as $dir) { - $tmpfiles = dol_dir_list(dol_buildpath($dir, 0), 'all', 0, '\modules.php', '', 'name', SORT_ASC, 0); + $tmpfiles = dol_dir_list(dol_buildpath($dir, 0), 'all', 0, '.modules.php', '', 'name', SORT_ASC, 0); if (!empty($tmpfiles)) { $listoffiles = array_merge($listoffiles, $tmpfiles); } From 38d3b9ca71a8a8d55ebf591539c71c0ee444be7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 11 Nov 2021 16:54:20 +0100 Subject: [PATCH 2/2] fix regex --- htdocs/core/modules/printing/modules_printing.php | 2 +- htdocs/core/modules/printing/printipp.modules.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/printing/modules_printing.php b/htdocs/core/modules/printing/modules_printing.php index 1bbf78df022..fa86d832b73 100644 --- a/htdocs/core/modules/printing/modules_printing.php +++ b/htdocs/core/modules/printing/modules_printing.php @@ -69,7 +69,7 @@ class PrintingDriver $listoffiles = array(); $dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']); foreach ($dirmodels as $dir) { - $tmpfiles = dol_dir_list(dol_buildpath($dir, 0), 'all', 0, '.modules.php', '', 'name', SORT_ASC, 0); + $tmpfiles = dol_dir_list(dol_buildpath($dir, 0), 'all', 0, '\.modules.php', '', 'name', SORT_ASC, 0); if (!empty($tmpfiles)) { $listoffiles = array_merge($listoffiles, $tmpfiles); } diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php index f290b2b4e90..584e7751fd7 100644 --- a/htdocs/core/modules/printing/printipp.modules.php +++ b/htdocs/core/modules/printing/printipp.modules.php @@ -108,10 +108,10 @@ class printing_printipp extends PrintingDriver global $conf; $this->db = $db; - $this->host = $conf->global->PRINTIPP_HOST; - $this->port = $conf->global->PRINTIPP_PORT; - $this->user = $conf->global->PRINTIPP_USER; - $this->password = $conf->global->PRINTIPP_PASSWORD; + $this->host = getDolGlobalString('PRINTIPP_HOST'); + $this->port = getDolGlobalString('PRINTIPP_PORT'); + $this->user = getDolGlobalString('PRINTIPP_USER'); + $this->password = getDolGlobalString('PRINTIPP_PASSWORD'); $this->conf[] = array('varname'=>'PRINTIPP_HOST', 'required'=>1, 'example'=>'localhost', 'type'=>'text'); $this->conf[] = array('varname'=>'PRINTIPP_PORT', 'required'=>1, 'example'=>'631', 'type'=>'text'); $this->conf[] = array('varname'=>'PRINTIPP_USER', 'required'=>0, 'example'=>'', 'type'=>'text', 'moreattributes'=>'autocomplete="off"');