From 8555a1b7f7fee2f077e8608220a1269f40d439f2 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sat, 3 Jan 2015 16:42:52 -0600 Subject: [PATCH] Fixing Issue 92 - Downloading files with same name --- indefero/src/IDF/Views/Download.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indefero/src/IDF/Views/Download.php b/indefero/src/IDF/Views/Download.php index 20247be..f3e06f1 100644 --- a/indefero/src/IDF/Views/Download.php +++ b/indefero/src/IDF/Views/Download.php @@ -198,7 +198,7 @@ class IDF_Views_Download public function download($request, $match) { $prj = $request->project; - $sql = new Pluf_SQL('file=%s', array($match[2])); + $sql = new Pluf_SQL('file=%s and project=%s', array($match[2], $prj->id)); $upload = Pluf::factory('IDF_Upload')->getOne(array('filter' => $sql->gen())); if (!$upload) throw new Pluf_HTTP_Error404(); $prj->inOr404($upload);