From 8e68aa86acd2297ed4f1bff6487dde4f9be83c1e Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Sun, 14 May 2017 15:17:40 +0200 Subject: [PATCH] problems with additionnal template type If i active my new xml templater, and keep odt, the odt folder is added on folder to scan on my xml path ex : odt folder defined : c:\toto xml folder defined : c:\tata folder scanned with odt : c:\toto folder scanned with odt : c:\toto,c:\tata --- htdocs/core/lib/functions2.lib.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index b36da631635..2f46ad49b80 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1530,8 +1530,10 @@ function getListOfModels($db,$type,$maxfilenamelength=0) include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $const=$obj->description; - $dirtoscan.=($dirtoscan?',':'').preg_replace('/[\r\n]+/',',',trim($conf->global->$const)); - $listoffiles=array(); + //irtoscan.=($dirtoscan?',':'').preg_replace('/[\r\n]+/',',',trim($conf->global->$const)); + $dirtoscan= preg_replace('/[\r\n]+/',',',trim($conf->global->$const)); + + $listoffiles=array(); // Now we add models found in directories scanned $listofdir=explode(',',$dirtoscan); @@ -2111,4 +2113,4 @@ function cartesianArray(array $input) { } return $result; -} \ No newline at end of file +}