diff options
author | Bharat Mediratta <bharat@menalto.com> | 2013-02-15 16:15:40 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2013-02-15 19:17:34 -0500 |
commit | 96ad7789c84b5b81320f9cb94b4c8cb4e10ad92f (patch) | |
tree | 48fea2a436e97bcf83b86c35b898da5d7ad31e0b /modules | |
parent | 9346503c62a14a738dfa2efe24b8831275b73f44 (diff) |
Follow-on to 7bdccade98e76df3a7830bc45bc42321a77c709a to exclude
directories for now.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/helpers/gallery_event.php | 5 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_task.php | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index eb54e521..26432ef5 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -54,6 +54,11 @@ class gallery_event_Core { continue; } + // Ignore directories for now, but we should really address them in the long term. + if (is_dir("$dir/$file")) { + continue; + } + if (filemtime("$dir/$file") <= $threshold) { unlink("$dir/$file"); break; diff --git a/modules/gallery/helpers/gallery_task.php b/modules/gallery/helpers/gallery_task.php index 37de2f93..a79cb2d5 100644 --- a/modules/gallery/helpers/gallery_task.php +++ b/modules/gallery/helpers/gallery_task.php @@ -290,6 +290,11 @@ class gallery_task_Core { continue; } + // Ignore directories for now, but we should really address them in the long term. + if (is_dir("$dir/$file")) { + continue; + } + if (filemtime("$dir/$file") <= $threshold) { $files[] = "$dir/$file"; } |