1
0
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:
CaMer0n
2012-07-13 06:32:42 +00:00
parent 11318bf7c1
commit 8c497fcee1
2 changed files with 9 additions and 6 deletions

View File

@@ -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');

View File

@@ -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)))