aboutsummaryrefslogtreecommitdiff
path: root/src/phorkie/File.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2012-04-17 19:53:13 +0200
committerChristian Weiske <cweiske@cweiske.de>2012-04-17 19:53:13 +0200
commit5d76ec85a500321127ac879ffaa0aabd686bb7bf (patch)
treea64cf47a47ea70bad57ba0c7ec10dd05465811f1 /src/phorkie/File.php
parent7290b224b0ddeb369349d61f928190b96b6013b1 (diff)
downloadphorkie-5d76ec85a500321127ac879ffaa0aabd686bb7bf.tar.gz
phorkie-5d76ec85a500321127ac879ffaa0aabd686bb7bf.zip
raw download for older revisions
Diffstat (limited to 'src/phorkie/File.php')
-rw-r--r--src/phorkie/File.php7
1 files changed, 6 insertions, 1 deletions
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();
}