Fix: Init at the wrong place
This commit is contained in:
parent
fa95cb2540
commit
73437223d8
@ -70,19 +70,20 @@ class Export
|
|||||||
|
|
||||||
dol_syslog("Export::load_arrays user=".$user->id." filter=".$filter);
|
dol_syslog("Export::load_arrays user=".$user->id." filter=".$filter);
|
||||||
|
|
||||||
|
$var=true;
|
||||||
|
$i=0;
|
||||||
|
|
||||||
//$dir=DOL_DOCUMENT_ROOT."/includes/modules";
|
//$dir=DOL_DOCUMENT_ROOT."/includes/modules";
|
||||||
foreach($conf->file->dol_document_root as $dirroot)
|
foreach($conf->file->dol_document_root as $dirroot)
|
||||||
{
|
{
|
||||||
$dir = $dirroot.'/includes/modules';
|
$dir = $dirroot.'/includes/modules';
|
||||||
$handle=opendir($dir);
|
|
||||||
|
|
||||||
// Search available exports
|
// Search available exports
|
||||||
$handle=@opendir($dir);
|
$handle=@opendir($dir);
|
||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
$var=True;
|
// Search module files
|
||||||
$i=0;
|
while (($file = readdir($handle))!==false)
|
||||||
while (($file = readdir($handle))!==false)
|
|
||||||
{
|
{
|
||||||
if (preg_match("/^(mod.*)\.class\.php$/i",$file,$reg))
|
if (preg_match("/^(mod.*)\.class\.php$/i",$file,$reg))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -63,6 +63,9 @@ class Import
|
|||||||
|
|
||||||
dol_syslog("Import::load_arrays user=".$user->id." filter=".$filter);
|
dol_syslog("Import::load_arrays user=".$user->id." filter=".$filter);
|
||||||
|
|
||||||
|
$var=true;
|
||||||
|
$i=0;
|
||||||
|
|
||||||
//$dir=DOL_DOCUMENT_ROOT."/includes/modules";
|
//$dir=DOL_DOCUMENT_ROOT."/includes/modules";
|
||||||
foreach($conf->file->dol_document_root as $dirroot)
|
foreach($conf->file->dol_document_root as $dirroot)
|
||||||
{
|
{
|
||||||
@ -72,10 +75,8 @@ class Import
|
|||||||
$handle=@opendir($dir);
|
$handle=@opendir($dir);
|
||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
// Recherche des exports disponibles
|
// Search module files
|
||||||
$var=True;
|
while (($file = readdir($handle))!==false)
|
||||||
$i=0;
|
|
||||||
while (($file = readdir($handle))!==false)
|
|
||||||
{
|
{
|
||||||
if (preg_match("/^(mod.*)\.class\.php/i",$file,$reg))
|
if (preg_match("/^(mod.*)\.class\.php/i",$file,$reg))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user