srchub

srchub Commit Details


Date:2016-05-01 15:58:22 (8 years 7 months ago)
Author:Natalie Adams
Branch:master
Commit:0a15874ea1874a59233f3d4b4df882e2f8cadf4a
Parents: 5d37f6fa6c3a11397277cdf36ccac99184ddb1d3
Message:Issue 158: Previewing a file using a SCM that does not have file info throws exception

Changes:

File differences

indefero/src/IDF/Views/Source.php
213213
214214
215215
216
216
217217
218218
219219
$commit, $scm);
$previewSizeLimit = Pluf::f("preview_size_limit", 2000000);
if (!IDF_FileUtil::isText($info) && !IDF_FileUtil::isImage($info) ||
(!IDF_FileUtil::isImage($info) && $request_file_info->size >= $previewSizeLimit)) {
(!IDF_FileUtil::isImage($info) && property_exists($request_file_info, "size") && $request_file_info->size >= $previewSizeLimit)) {
$rep = new Pluf_HTTP_Response($scm->getFile($request_file_info),
$info[0]);
$rep->headers['Content-Disposition'] = 'attachment; filename="'.$info[1].'"';

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05300s using 20 queries.