2
0
forked from Wavyzz/dolibarr

Fix: File not found error

This commit is contained in:
Laurent Destailleur
2011-02-22 08:46:36 +00:00
parent 895882a31e
commit 5a65a1a19a

View File

@@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -996,7 +996,6 @@ function getListOfModels($db,$type)
global $conf,$langs; global $conf,$langs;
$liste=array(); $liste=array();
$found=0; $found=0;
$dirtoscan=''; $dirtoscan='';
$sql = "SELECT nom as id, nom as lib, libelle as label, description as description"; $sql = "SELECT nom as id, nom as lib, libelle as label, description as description";
@@ -1019,6 +1018,8 @@ function getListOfModels($db,$type)
// with the constant that contains list of directories to scan (COMPANY_ADDON_PDF_ODT_PATH, ...). // with the constant that contains list of directories to scan (COMPANY_ADDON_PDF_ODT_PATH, ...).
if (! empty($obj->description)) // List of directories to scan is defined if (! empty($obj->description)) // List of directories to scan is defined
{ {
include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
$const=$obj->description; $const=$obj->description;
$dirtoscan.=($dirtoscan?',':'').preg_replace('/[\r\n]+/',',',trim($conf->global->$const)); $dirtoscan.=($dirtoscan?',':'').preg_replace('/[\r\n]+/',',',trim($conf->global->$const));