diff --git a/htdocs/includes/barcode/php-barcode/php-barcode.php b/htdocs/includes/barcode/php-barcode/php-barcode.php index 0ef2e6d6fcb..89385045629 100644 --- a/htdocs/includes/barcode/php-barcode/php-barcode.php +++ b/htdocs/includes/barcode/php-barcode/php-barcode.php @@ -78,7 +78,7 @@ if (isset($_SERVER['WINDIR']) && @file_exists($_SERVER['WINDIR'])){ * genbarcode is needed to render encodings other than EAN-12/EAN-13/ISBN */ // DOL_CHANGE LDR -if (isset($_SERVER['WINDIR']) && @file_exists($_SERVER['WINDIR'])) +if (isset($_SERVER['WINDIR']) && empty($conf->global->GENBARCODE_LOCATION)) { $genbarcode_loc = DOL_DOCUMENT_ROOT.'/includes/barcode/php-barcode/genbarcode/genbarcode.exe'; } diff --git a/htdocs/includes/modules/modBarcode.class.php b/htdocs/includes/modules/modBarcode.class.php index 9e7e8adfe32..21518b041b4 100644 --- a/htdocs/includes/modules/modBarcode.class.php +++ b/htdocs/includes/modules/modBarcode.class.php @@ -68,8 +68,10 @@ class modBarcode extends DolibarrModules // Config pages $this->config_page_url = array("barcode.php"); - // Constantes - $this->const = array(); + // Constants + // Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',0), + // 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0) ); + $this->const = array(0=>array('GENBARCODE_LOCATION','chaine',DOL_DOCUMENT_ROOT.'/includes/barcode/php-barcode/genbarcode/genbarcode','Path to genbarcode command line tool',0)); // Boxes $this->boxes = array(); diff --git a/htdocs/install/mysql/data/llx_const.sql b/htdocs/install/mysql/data/llx_const.sql index 2099742b049..686eec6fb74 100644 --- a/htdocs/install/mysql/data/llx_const.sql +++ b/htdocs/install/mysql/data/llx_const.sql @@ -179,12 +179,6 @@ insert into llx_const (name, value, type, note, visible) values ('FACTURE_ADDON_ insert into llx_const (name, value, type, note, visible) VALUES ('PROPALE_VALIDITY_DURATION', '15', 'chaine', 'Durée de validitée des propales',0); --- --- Barcode --- -insert into llx_const (name, value, type, note, visible, entity) values ('GENBARCODE_LOCATION','/usr/local/bin/genbarcode','chaine','location of genbarcode',0,0); - - -- -- Action sur agenda --