FIX Avoid errors on debian
This commit is contained in:
parent
1c59721294
commit
ffcfe30529
@ -64,24 +64,27 @@ class ExportExcel extends ModeleExports
|
|||||||
$this->picto='mime/xls'; // Picto
|
$this->picto='mime/xls'; // Picto
|
||||||
$this->version='1.30'; // Driver version
|
$this->version='1.30'; // Driver version
|
||||||
|
|
||||||
// If driver use an external library, put its name here
|
|
||||||
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
|
|
||||||
{
|
|
||||||
require_once PHP_WRITEEXCEL_PATH.'class.writeexcel_workbookbig.inc.php';
|
|
||||||
require_once PHP_WRITEEXCEL_PATH.'class.writeexcel_worksheet.inc.php';
|
|
||||||
require_once PHP_WRITEEXCEL_PATH.'functions.writeexcel_utility.inc.php';
|
|
||||||
$this->label_lib='PhpWriteExcel';
|
|
||||||
$this->version_lib='unknown';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
require_once PHPEXCEL_PATH.'PHPExcel.php';
|
|
||||||
require_once PHPEXCEL_PATH.'PHPExcel/Style/Alignment.php';
|
|
||||||
$this->label_lib='PhpExcel';
|
|
||||||
$this->version_lib='1.8.0'; // No way to get info from library
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->disabled = (in_array(constant('PHPEXCEL_PATH'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages)
|
$this->disabled = (in_array(constant('PHPEXCEL_PATH'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages)
|
||||||
|
|
||||||
|
if (empty($this->disabled))
|
||||||
|
{
|
||||||
|
// If driver use an external library, put its name here
|
||||||
|
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
|
||||||
|
{
|
||||||
|
require_once PHP_WRITEEXCEL_PATH.'class.writeexcel_workbookbig.inc.php';
|
||||||
|
require_once PHP_WRITEEXCEL_PATH.'class.writeexcel_worksheet.inc.php';
|
||||||
|
require_once PHP_WRITEEXCEL_PATH.'functions.writeexcel_utility.inc.php';
|
||||||
|
$this->label_lib='PhpWriteExcel';
|
||||||
|
$this->version_lib='unknown';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
require_once PHPEXCEL_PATH.'PHPExcel.php';
|
||||||
|
require_once PHPEXCEL_PATH.'PHPExcel/Style/Alignment.php';
|
||||||
|
$this->label_lib='PhpExcel';
|
||||||
|
$this->version_lib='1.8.0'; // No way to get info from library
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->row=0;
|
$this->row=0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,25 +64,28 @@ class ExportExcel2007 extends ExportExcel
|
|||||||
$this->picto='mime/xls'; // Picto
|
$this->picto='mime/xls'; // Picto
|
||||||
$this->version='1.30'; // Driver version
|
$this->version='1.30'; // Driver version
|
||||||
|
|
||||||
// If driver use an external library, put its name here
|
$this->disabled = (in_array(constant('PHPEXCEL_PATH'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages)
|
||||||
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
|
|
||||||
|
if (empty($this->disabled))
|
||||||
{
|
{
|
||||||
require_once PHP_WRITEEXCEL_PATH.'class.writeexcel_workbookbig.inc.php';
|
// If driver use an external library, put its name here
|
||||||
require_once PHP_WRITEEXCEL_PATH.'class.writeexcel_worksheet.inc.php';
|
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
|
||||||
require_once PHP_WRITEEXCEL_PATH.'functions.writeexcel_utility.inc.php';
|
{
|
||||||
$this->label_lib='PhpWriteExcel';
|
require_once PHP_WRITEEXCEL_PATH.'class.writeexcel_workbookbig.inc.php';
|
||||||
$this->version_lib='unknown';
|
require_once PHP_WRITEEXCEL_PATH.'class.writeexcel_worksheet.inc.php';
|
||||||
}
|
require_once PHP_WRITEEXCEL_PATH.'functions.writeexcel_utility.inc.php';
|
||||||
else
|
$this->label_lib='PhpWriteExcel';
|
||||||
{
|
$this->version_lib='unknown';
|
||||||
require_once PHPEXCEL_PATH.'PHPExcel.php';
|
}
|
||||||
require_once PHPEXCEL_PATH.'PHPExcel/Style/Alignment.php';
|
else
|
||||||
$this->label_lib='PhpExcel';
|
{
|
||||||
$this->version_lib='1.8.0'; // No way to get info from library
|
require_once PHPEXCEL_PATH.'PHPExcel.php';
|
||||||
|
require_once PHPEXCEL_PATH.'PHPExcel/Style/Alignment.php';
|
||||||
|
$this->label_lib='PhpExcel';
|
||||||
|
$this->version_lib='1.8.0'; // No way to get info from library
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->disabled = (in_array(constant('PHPEXCEL_PATH'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages)
|
|
||||||
|
|
||||||
$this->row=0;
|
$this->row=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,22 +65,24 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
|
|||||||
$moduleid=$reg[1];
|
$moduleid=$reg[1];
|
||||||
|
|
||||||
// Loading Class
|
// Loading Class
|
||||||
$file = $dir."/export_".$moduleid.".modules.php";
|
$file = $dir."export_".$moduleid.".modules.php";
|
||||||
$classname = "Export".ucfirst($moduleid);
|
$classname = "Export".ucfirst($moduleid);
|
||||||
|
|
||||||
require_once $file;
|
require_once $file;
|
||||||
$module = new $classname($db);
|
if (class_exists($classname))
|
||||||
|
{
|
||||||
// Picto
|
$module = new $classname($db);
|
||||||
$this->picto[$module->id]=$module->picto;
|
|
||||||
// Driver properties
|
// Picto
|
||||||
$this->driverlabel[$module->id]=$module->getDriverLabel().(empty($module->disabled)?'':' __(Disabled)__'); // '__(Disabled)__' is a key
|
$this->picto[$module->id]=$module->picto;
|
||||||
$this->driverdesc[$module->id]=$module->getDriverDesc();
|
// Driver properties
|
||||||
$this->driverversion[$module->id]=$module->getDriverVersion();
|
$this->driverlabel[$module->id]=$module->getDriverLabel().(empty($module->disabled)?'':' __(Disabled)__'); // '__(Disabled)__' is a key
|
||||||
// If use an external lib
|
$this->driverdesc[$module->id]=$module->getDriverDesc();
|
||||||
$this->liblabel[$module->id]=$module->getLibLabel();
|
$this->driverversion[$module->id]=$module->getDriverVersion();
|
||||||
$this->libversion[$module->id]=$module->getLibVersion();
|
// If use an external lib
|
||||||
|
$this->liblabel[$module->id]=$module->getLibLabel();
|
||||||
|
$this->libversion[$module->id]=$module->getLibVersion();
|
||||||
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user