From 0cbe522a67cc8e81cf75874fd7532096acc52c9a Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sat, 31 Dec 2011 01:22:09 +0000 Subject: [PATCH] Remove sample files from MediaFilesIterator --- .../Utility/MediaFilesIterator.class.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/lib/DownloadDispatcher/Utility/MediaFilesIterator.class.php b/source/lib/DownloadDispatcher/Utility/MediaFilesIterator.class.php index 1ce7df2..b5c8d62 100644 --- a/source/lib/DownloadDispatcher/Utility/MediaFilesIterator.class.php +++ b/source/lib/DownloadDispatcher/Utility/MediaFilesIterator.class.php @@ -1,8 +1,14 @@ current()->getFilename()); + public function accept() { + $filename = $this->current()->getFilename(); + if (preg_match('/^sample/', $filename)) { + return false; + } + if (preg_match('/(?