Fixing Issue 92 - Downloading files with same name
This commit is contained in:
parent
3ccdcf666b
commit
8555a1b7f7
@ -198,7 +198,7 @@ class IDF_Views_Download
|
|||||||
public function download($request, $match)
|
public function download($request, $match)
|
||||||
{
|
{
|
||||||
$prj = $request->project;
|
$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()));
|
$upload = Pluf::factory('IDF_Upload')->getOne(array('filter' => $sql->gen()));
|
||||||
if (!$upload) throw new Pluf_HTTP_Error404();
|
if (!$upload) throw new Pluf_HTTP_Error404();
|
||||||
$prj->inOr404($upload);
|
$prj->inOr404($upload);
|
||||||
|
Loading…
Reference in New Issue
Block a user