Fixed the download of a commit diff file.

Note, we need to stream this commit diff like for the archive for
performance reasons.
This commit is contained in:
Loic d'Anterroches 2009-01-20 16:33:36 +01:00
parent e159185465
commit 8cfc5ec026

View File

@ -259,7 +259,7 @@ class IDF_Views_Source
$branches[0])); $branches[0]));
return new Pluf_HTTP_Response_Redirect($url); return new Pluf_HTTP_Response_Redirect($url);
} }
$cobject = $scm->getCommit($commit); $cobject = $scm->getCommit($commit, true);
$rep = new Pluf_HTTP_Response($cobject->changes, 'text/plain'); $rep = new Pluf_HTTP_Response($cobject->changes, 'text/plain');
$rep->headers['Content-Disposition'] = 'attachment; filename="'.$commit.'.diff"'; $rep->headers['Content-Disposition'] = 'attachment; filename="'.$commit.'.diff"';
return $rep; return $rep;