mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +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');
|
||||
$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');
|
||||
|
||||
|
@@ -115,6 +115,13 @@ class e_file
|
||||
$this->finfo = $val;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function setFileFilter($filter)
|
||||
{
|
||||
$this->fileFilter = $filter;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read files from given path
|
||||
@@ -158,11 +165,6 @@ class e_file
|
||||
{
|
||||
$omit = array($omit);
|
||||
}
|
||||
|
||||
if(count($omit))
|
||||
{
|
||||
$this->fileFilter = $omit;
|
||||
}
|
||||
}
|
||||
|
||||
while (false !== ($file = readdir($handle)))
|
||||
|
Reference in New Issue
Block a user