git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tell people how to deactivate setup check
[phorkie.git]
/
www
/
raw.php
diff --git
a/www/raw.php
b/www/raw.php
index 69b5f569719baa4630d872cc9a21bd5975df2f10..8bda11e8fbaeb9b363bb726bf27239ad9de32eef 100644
(file)
--- a/
www/raw.php
+++ b/
www/raw.php
@@
-17,5
+17,10
@@
if ($mimetype === null) {
$mimetype = 'text/plain';
}
header('Content-Type: ' . $mimetype);
$mimetype = 'text/plain';
}
header('Content-Type: ' . $mimetype);
-readfile($file->path);
+if ($repo->hash === null) {
+ //IIRC readfile is not so memory-intensive for big files
+ readfile($file->getFullPath());
+} else {
+ echo $file->getContent();
+}
?>
?>