mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
file-class filter fix
This commit is contained in:
@@ -1182,7 +1182,8 @@ class media_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
$fl->setFileInfo('all');
|
$fl->setFileInfo('all');
|
||||||
$rejectArray = array('^\.ftpquota$','^index\.html$','^null\.txt$','\.bak$','^.tmp','.*\.xml$','^\.$','^\.\.$','^\/$','^CVS$','thumbs\.db','.*\._$','^\.htaccess$','index\.html','null\.txt');
|
$rejectArray = array('^\.ftpquota$','^index\.html$','^null\.txt$','\.bak$','^.tmp','.*\.xml$','^\.$','^\.\.$','^\/$','^CVS$','thumbs\.db','.*\._$','^\.htaccess$','index\.html','null\.txt');
|
||||||
$files = $fl->get_files(e_MEDIA."temp/",'',$rejectArray);
|
$fl->setFileFilter($rejectArray);
|
||||||
|
$files = $fl->get_files(e_MEDIA."temp/");
|
||||||
|
|
||||||
e107::js('core','core/admin.js','prototype');
|
e107::js('core','core/admin.js','prototype');
|
||||||
|
|
||||||
|
@@ -115,6 +115,13 @@ class e_file
|
|||||||
$this->finfo = $val;
|
$this->finfo = $val;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function setFileFilter($filter)
|
||||||
|
{
|
||||||
|
$this->fileFilter = $filter;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read files from given path
|
* Read files from given path
|
||||||
@@ -158,11 +165,6 @@ class e_file
|
|||||||
{
|
{
|
||||||
$omit = array($omit);
|
$omit = array($omit);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($omit))
|
|
||||||
{
|
|
||||||
$this->fileFilter = $omit;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (false !== ($file = readdir($handle)))
|
while (false !== ($file = readdir($handle)))
|
||||||
|
Reference in New Issue
Block a user