Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Added option to hide files from overview #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion core/class/browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 736,25 @@ protected function getFiles($dir) {

foreach ($files as $file) {


if ( isset( $this->config[ 'hideFiles' ] ) && is_array( $this->config[ 'hideFiles' ] ) )
{
$continue = false;
$basename = basename($file);
foreach( $this->config[ 'hideFiles' ] as $pattern )
{
preg_match( '/'.$pattern.'/', $basename, $matches );
if ( $matches && count( $matches ) > 0 )
{
$continue = true;
}
}
if ( $continue )
{
continue;
}
}

$img = new fastImage($file);
$type = $img->getType();

Expand Down Expand Up @@ -910,4 929,4 @@ protected function errorMsg($message, array $data=null) {
}
}

?>
?>