diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2013-02-16 23:53:58 -0500 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2013-02-16 23:53:58 -0500 |
| commit | cc45e2e33b07cd27a87300f5d239394a14569308 (patch) | |
| tree | 874bf217675634692ac0a43e4641d58cc1abbf13 /modules/gallery/helpers/gallery_task.php | |
| parent | 4203ecc0b3c482e7dd687d70aa326fe7ad9365b0 (diff) | |
| parent | 87d20c63af02ae573853da2cb82d7323a56677b5 (diff) | |
Merge branch 'master' into jquery_190
Diffstat (limited to 'modules/gallery/helpers/gallery_task.php')
| -rw-r--r-- | modules/gallery/helpers/gallery_task.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery_task.php b/modules/gallery/helpers/gallery_task.php index 856d2639..a79cb2d5 100644 --- a/modules/gallery/helpers/gallery_task.php +++ b/modules/gallery/helpers/gallery_task.php @@ -281,6 +281,7 @@ class gallery_task_Core { switch ($task->get("mode", "init")) { case "init": $threshold = time() - 1209600; // older than 2 weeks + // Note that this code is roughly duplicated in gallery_event::gallery_shutdown foreach(array("logs", "tmp") as $dir) { $dir = VARPATH . $dir; if ($dh = opendir($dir)) { @@ -289,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"; } |
