118,6 → 118,20 |
exit; |
} |
|
// Explicitly requested file as attachment |
if (isset($_REQUEST['getfile'])) |
{ |
$base = basename($path); |
|
header("Content-Type: application/octet-stream"); |
header("Content-Length: $size"); |
header("Content-Disposition: inline; filename=".urlencode($base)); |
|
$svnrep->getFileContents($path, "", $rev); |
|
exit; |
} |
|
// There's no associated MIME type. Show the file using WebSVN. |
|
$url = $config->getURL($rep, $path, "file"); |
143,6 → 157,9 |
$url = $config->getURL($rep, $path, "blame"); |
$vars["blamelink"] = "<a href=\"${url}rev=$passrev&sc=$showchanged\">${lang["BLAME"]}</a>"; |
|
$url = $config->getURL($rep, $path, "get"); |
$vars["getfile"] = "<a href=\"${url}getfile&rev=$passrev&sc=$showchanged\">${lang["GETFILE"]}</a>"; |
|
$listing = array (); |
|
$vars["version"] = $version; |