From 5d76ec85a500321127ac879ffaa0aabd686bb7bf Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 17 Apr 2012 19:53:13 +0200 Subject: raw download for older revisions --- src/phorkie/File.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/phorkie/File.php') diff --git a/src/phorkie/File.php b/src/phorkie/File.php index bc0950f..acc44cd 100644 --- a/src/phorkie/File.php +++ b/src/phorkie/File.php @@ -102,7 +102,12 @@ class File public function getLink($type, $option = null) { if ($type == 'raw') { - return '/' . $this->repo->id . '/raw/' . $this->getFilename(); + if ($this->repo->hash === null) { + return '/' . $this->repo->id . '/raw/' . $this->getFilename(); + } else { + return '/' . $this->repo->id . '/rev-raw/' . $this->repo->hash + . '/' . $this->getFilename(); + } } else if ($type == 'tool') { return '/' . $this->repo->id . '/tool/' . $option . '/' . $this->getFilename(); } -- cgit v1.2.3