fix regex

This commit is contained in:
Frédéric FRANCE 2021-11-11 16:54:20 +01:00
parent 39777d4cc5
commit 38d3b9ca71
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
2 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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"');