Fix bug reported by scrutinizer
This commit is contained in:
parent
868caa4991
commit
4e6b21881f
@ -468,16 +468,17 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir,
|
|||||||
{
|
{
|
||||||
//print 'modulepart='.$modulepart.' fullpathselecteddir='.$fullpathselecteddir.' - val[fullrelativename] (in database)='.$val['fullrelativename'].' - val[id]='.$val['id'].' - is_dir='.dol_is_dir($fullpathselecteddir . $file).' - file='.$file."\n";
|
//print 'modulepart='.$modulepart.' fullpathselecteddir='.$fullpathselecteddir.' - val[fullrelativename] (in database)='.$val['fullrelativename'].' - val[id]='.$val['id'].' - is_dir='.dol_is_dir($fullpathselecteddir . $file).' - file='.$file."\n";
|
||||||
$newselecteddir = $val['fullrelativename'];
|
$newselecteddir = $val['fullrelativename'];
|
||||||
|
$newfullpathselecteddir='';
|
||||||
if ($modulepart == 'ecm')
|
if ($modulepart == 'ecm')
|
||||||
{
|
{
|
||||||
$newfullpathselecteddir=$conf->ecm->dir_output.'/'.($val['fullrelativename'] != '/' ? $val['fullrelativename'] : '');
|
$newfullpathselecteddir=$conf->ecm->dir_output.'/'.($val['fullrelativename'] != '/' ? $val['fullrelativename'] : '');
|
||||||
}
|
}
|
||||||
if ($modulepart == 'medias')
|
elseif ($modulepart == 'medias')
|
||||||
{
|
{
|
||||||
$newfullpathselecteddir=$dolibarr_main_data_root.'/medias/'.($val['fullrelativename'] != '/' ? $val['fullrelativename'] : '');
|
$newfullpathselecteddir=$dolibarr_main_data_root.'/medias/'.($val['fullrelativename'] != '/' ? $val['fullrelativename'] : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
treeOutputForAbsoluteDir($sqltree, $newselecteddir, $newfullpathselecteddir, $modulepart, $websitekey, $pageid, $preopened, $fullpathpreopened, $depth+1);
|
if ($newfullpathselecteddir) treeOutputForAbsoluteDir($sqltree, $newselecteddir, $newfullpathselecteddir, $modulepart, $websitekey, $pageid, $preopened, $fullpathpreopened, $depth+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</li>\n";
|
print "</li>\n";
|
||||||
|
|||||||
@ -126,7 +126,7 @@ class Menubase
|
|||||||
$this->perms=trim($this->perms);
|
$this->perms=trim($this->perms);
|
||||||
$this->enabled=trim($this->enabled);
|
$this->enabled=trim($this->enabled);
|
||||||
$this->user=trim($this->user);
|
$this->user=trim($this->user);
|
||||||
$this->position=trim($this->position);
|
if (empty($this->position)) $this->position=0;
|
||||||
if (! $this->level) $this->level=0;
|
if (! $this->level) $this->level=0;
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user