Update html.formfile.class.php
This commit is contained in:
parent
365fffddf5
commit
bf36f00897
@ -851,8 +851,15 @@ class FormFile
|
|||||||
$this->infofiles=array('nboffiles'=>0,'extensions'=>array(),'files'=>array());
|
$this->infofiles=array('nboffiles'=>0,'extensions'=>array(),'files'=>array());
|
||||||
|
|
||||||
// Get object entity
|
// Get object entity
|
||||||
preg_match('/\/([0-9]+)\/[^\/]+\/'.preg_quote($modulesubdir).'$/', $filedir, $regs);
|
if (empty($conf->multicompany->enabled))
|
||||||
$entity = ((! empty($regs[1]) && $regs[1] > 1) ? $regs[1] : $conf->entity);
|
{
|
||||||
|
$entity = $conf->entity;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
preg_match('/\/([0-9]+)\/[^\/]+\/'.preg_quote($modulesubdir).'$/', $filedir, $regs);
|
||||||
|
$entity = ((! empty($regs[1]) && $regs[1] > 1) ? $regs[1] : $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
$filterforfilesearch = preg_quote(basename($modulesubdir),'/').'[^\-]+';
|
$filterforfilesearch = preg_quote(basename($modulesubdir),'/').'[^\-]+';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user