1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-10 08:34:09 +02:00

Forum now allows for multiple attachments in a single user selection. For update thread/count should now working with PDO.

This commit is contained in:
Cameron
2016-03-21 14:32:02 -07:00
parent d7818345ce
commit bf2db49dd1
6 changed files with 104 additions and 25 deletions

View File

@@ -1040,8 +1040,42 @@ class e_file
return process_uploaded_files($uploaddir, $fileinfo, $options);
}
/**
* Quickly scan and return a list of files in a directory.
* @param $dir
* @return array
*/
public function scandir($dir, $extensions=null)
{
$list = array();
$ext = str_replace(",","|",$extensions);
$tmp = scandir($dir);
foreach($tmp as $v)
{
if($v == '.' || $v == '..')
{
continue;
}
if(!empty($ext) && !preg_match("/\.(".$ext.")$/i", $v))
{
continue;
}
$list[] = $v;
}
return $list ;
}
/**
* Unzip Plugin or Theme zip file and move to plugin or theme folder.
* @param string $localfile - filename located in e_TEMP