From ce3f9211e440a9ce71698c77cb2d3d08091d5aef Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 13 May 2014 13:52:20 -0700 Subject: [PATCH] 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 --- .../conduit/ConduitAPI_diffusion_readmequery_Method.php | 4 +--- .../controller/DiffusionBrowseDirectoryController.php | 1 + .../diffusion/controller/DiffusionRepositoryController.php | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/applications/diffusion/conduit/ConduitAPI_diffusion_readmequery_Method.php b/src/applications/diffusion/conduit/ConduitAPI_diffusion_readmequery_Method.php index 7c2b29877b..93d61a4f0e 100644 --- a/src/applications/diffusion/conduit/ConduitAPI_diffusion_readmequery_Method.php +++ b/src/applications/diffusion/conduit/ConduitAPI_diffusion_readmequery_Method.php @@ -1,8 +1,5 @@ 'required array ', + 'commit' => 'optional string', ); } diff --git a/src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php b/src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php index 62a37d7861..85e3545b4f 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php @@ -70,6 +70,7 @@ final class DiffusionBrowseDirectoryController 'diffusion.readmequery', array( 'paths' => $results->getPathDicts(), + 'commit' => $drequest->getStableCommit(), )); if ($readme) { $box = new PHUIBoxView(); diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php index 0dd6379910..7a2f6fc7a6 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php @@ -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;