Diffusion - break out readme query all on its own
Summary: nice title. Ref T2784. Fixes T3171. Test Plan: For all 3 VCS types, viewed phabricator repository and saw readme. browsed said repository and saw readme. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2784, T3171 Differential Revision: https://secure.phabricator.com/D5993
This commit is contained in:
@@ -15,7 +15,6 @@ final class DiffusionBrowseController extends DiffusionController {
|
||||
array(
|
||||
'path' => $drequest->getPath(),
|
||||
'commit' => $drequest->getCommit(),
|
||||
'renderReadme' => true,
|
||||
)));
|
||||
$reason = $results->getReasonForEmptyResultSet();
|
||||
$is_file = ($reason == DiffusionBrowseResultSet::REASON_IS_FILE);
|
||||
@@ -84,7 +83,11 @@ final class DiffusionBrowseController extends DiffusionController {
|
||||
|
||||
$content[] = $this->buildOpenRevisions();
|
||||
|
||||
$readme = $results->getReadmeContent();
|
||||
$readme = $this->callConduitWithDiffusionRequest(
|
||||
'diffusion.readmequery',
|
||||
array(
|
||||
'paths' => $results->getPathDicts()
|
||||
));
|
||||
if ($readme) {
|
||||
$box = new PHUIBoxView();
|
||||
$box->setShadow(true);
|
||||
|
||||
@@ -28,12 +28,10 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
array(
|
||||
'path' => $drequest->getPath(),
|
||||
'commit' => $drequest->getCommit(),
|
||||
'renderReadme' => true,
|
||||
)));
|
||||
$browse_paths = $browse_results->getPaths();
|
||||
|
||||
$phids = array();
|
||||
|
||||
foreach ($history as $item) {
|
||||
$data = $item->getCommitData();
|
||||
if ($data) {
|
||||
@@ -57,10 +55,15 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$phids = array_keys($phids);
|
||||
$handles = $this->loadViewerHandles($phids);
|
||||
|
||||
$readme = $this->callConduitWithDiffusionRequest(
|
||||
'diffusion.readmequery',
|
||||
array(
|
||||
'paths' => $browse_results->getPathDicts()
|
||||
));
|
||||
|
||||
$history_table = new DiffusionHistoryTableView();
|
||||
$history_table->setUser($this->getRequest()->getUser());
|
||||
$history_table->setDiffusionRequest($drequest);
|
||||
@@ -109,7 +112,6 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
|
||||
$content[] = $this->buildBranchListTable($drequest);
|
||||
|
||||
$readme = $browse_results->getReadmeContent();
|
||||
if ($readme) {
|
||||
$box = new PHUIBoxView();
|
||||
$box->setShadow(true);
|
||||
|
||||
Reference in New Issue
Block a user