Fix: Do not use $_ENV anymore.

This commit is contained in:
Laurent Destailleur 2010-04-18 16:08:53 +00:00
parent 27acaefb6c
commit 149d6ae8dd
3 changed files with 5 additions and 9 deletions

View File

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

View File

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

View File

@ -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
--