1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 07:12:41 +01:00

Set full path for DiffusionRepositoryPath in svn diffusion browse query

Summary:
The full path field of the DiffusionRepositoryPath object is used by the
DiffusionBrowseController when viewing a directory with a readme file, so
we should set this field.

Test Plan: loaded a directory containing a readme in a svn repo

Reviewers: epriestley, jungejason, emiraga

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2045
This commit is contained in:
Nick Harper 2012-03-28 20:43:48 -07:00
parent ec8b445727
commit 8acd596925

View file

@ -171,11 +171,13 @@ final class DiffusionSvnBrowseQuery extends DiffusionBrowseQuery {
$results = array();
foreach ($browse as $file) {
$file_path = $file['pathName'];
$file_path = ltrim(substr($file_path, strlen($path_normal)), '/');
$full_path = $file['pathName'];
$file_path = ltrim(substr($full_path, strlen($path_normal)), '/');
$full_path = ltrim($full_path, '/');
$result = new DiffusionRepositoryPath();
$result->setPath($file_path);
$result->setFullPath($full_path);
// $result->setHash($hash);
$result->setFileType($file['fileType']);
// $result->setFileSize($size);