From 5783c185bddfe5bc0d8c89b97319d4de2d55bd89 Mon Sep 17 00:00:00 2001 From: fmarcet Date: Thu, 11 Jun 2015 10:43:12 +0200 Subject: [PATCH] Fix: Not reading external barcode numeration module --- htdocs/product/card.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 2525e5c3d7b..d28846c059e 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -10,7 +10,7 @@ * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2011-2014 Alexandre Spangaro * Copyright (C) 2014 Cédric Gross - * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2014-2015 Ferran Marcet * * 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 @@ -820,8 +820,13 @@ else if (! empty($conf->barcode->enabled) && ! empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) { $module=strtolower($conf->global->BARCODE_PRODUCT_ADDON_NUM); - $result=dol_include_once('/core/modules/barcode/'.$module.'.php'); - if ($result > 0) + $dirbarcode=array_merge(array('/core/modules/barcode/'),$conf->modules_parts['barcode']); + foreach ($dirbarcode as $dirroot) + { + $res=dol_include_once($dirroot.$module.'.php'); + if ($res) break; + } + if ($res > 0) { $modBarCodeProduct =new $module(); }