1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 13:00:56 +01:00

Let diffusion.readmequery accept a commit

Summary:
Ref T2683. This should probably just be `diffusion.filecontentquery` but keep things as they are for now.

This method uses a commit, so accept one. Soon, this will save a bit of work.

Test Plan: Viewed readmes in main and browse views.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2683

Differential Revision: https://secure.phabricator.com/D9093
This commit is contained in:
epriestley 2014-05-13 13:52:20 -07:00
parent 112c9e6b5e
commit ce3f9211e4
3 changed files with 4 additions and 4 deletions

View file

@ -1,8 +1,5 @@
<?php
/**
* @group conduit
*/
final class ConduitAPI_diffusion_readmequery_Method
extends ConduitAPI_diffusion_abstractquery_Method {
@ -19,6 +16,7 @@ final class ConduitAPI_diffusion_readmequery_Method
protected function defineCustomParamTypes() {
return array(
'paths' => 'required array <string>',
'commit' => 'optional string',
);
}

View file

@ -70,6 +70,7 @@ final class DiffusionBrowseDirectoryController
'diffusion.readmequery',
array(
'paths' => $results->getPathDicts(),
'commit' => $drequest->getStableCommit(),
));
if ($readme) {
$box = new PHUIBoxView();

View file

@ -83,7 +83,8 @@ final class DiffusionRepositoryController extends DiffusionController {
$readme = $this->callConduitWithDiffusionRequest(
'diffusion.readmequery',
array(
'paths' => $browse_results->getPathDicts()
'paths' => $browse_results->getPathDicts(),
'commit' => $drequest->getStableCommit(),
));
} else {
$readme = null;