Skip to content

Commit

Permalink
Fix: Init at the wrong place
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 2, 2011
1 parent fa95cb2 commit 7343722
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions htdocs/exports/class/export.class.php
Expand Up @@ -70,19 +70,20 @@ function load_arrays($user,$filter='')

dol_syslog("Export::load_arrays user=".$user->id." filter=".$filter);

$var=true;
$i=0;

//$dir=DOL_DOCUMENT_ROOT."/includes/modules";
foreach($conf->file->dol_document_root as $dirroot)
{
$dir = $dirroot.'/includes/modules';
$handle=opendir($dir);

// Search available exports
$handle=@opendir($dir);
if (is_resource($handle))
{
$var=True;
$i=0;
while (($file = readdir($handle))!==false)
// Search module files
while (($file = readdir($handle))!==false)
{
if (preg_match("/^(mod.*)\.class\.php$/i",$file,$reg))
{
Expand Down
9 changes: 5 additions & 4 deletions htdocs/imports/class/import.class.php
Expand Up @@ -63,6 +63,9 @@ function load_arrays($user,$filter='')

dol_syslog("Import::load_arrays user=".$user->id." filter=".$filter);

$var=true;
$i=0;

//$dir=DOL_DOCUMENT_ROOT."/includes/modules";
foreach($conf->file->dol_document_root as $dirroot)
{
Expand All @@ -72,10 +75,8 @@ function load_arrays($user,$filter='')
$handle=@opendir($dir);
if (is_resource($handle))
{
// Recherche des exports disponibles
$var=True;
$i=0;
while (($file = readdir($handle))!==false)
// Search module files
while (($file = readdir($handle))!==false)
{
if (preg_match("/^(mod.*)\.class\.php/i",$file,$reg))
{
Expand Down

0 comments on commit 7343722

Please sign in to comment.