@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Allow revision action links using VS diff

Test Plan: Created action link using VS diff, selected VS diff.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2770

vrana 5b6713f3 5d9896e7

+15 -3
+11 -1
src/applications/differential/controller/DifferentialRevisionDetailRenderer.php
··· 1 1 <?php 2 2 3 3 /* 4 - * Copyright 2011 Facebook, Inc. 4 + * Copyright 2012 Facebook, Inc. 5 5 * 6 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 7 * you may not use this file except in compliance with the License. ··· 17 17 */ 18 18 19 19 abstract class DifferentialRevisionDetailRenderer { 20 + private $vsDiff; 21 + 22 + final public function setVSDiff(DifferentialDiff $diff) { 23 + $this->vsDiff = $diff; 24 + return $this; 25 + } 26 + 27 + final protected function getVSDiff() { 28 + return $this->vsDiff; 29 + } 20 30 21 31 /** 22 32 * This function must return an array of action links that will be
+4 -2
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 227 227 228 228 // TODO: build a better version of the action links and deprecate the 229 229 // whole DifferentialRevisionDetailRenderer class. 230 - $custom_renderer = 231 - newv($custom_renderer_class, array()); 230 + $custom_renderer = newv($custom_renderer_class, array()); 231 + if ($diff_vs) { 232 + $custom_renderer->setVSDiff($diffs[$diff_vs]); 233 + } 232 234 $actions = array_merge( 233 235 $actions, 234 236 $custom_renderer->generateActionLinks($revision, $target_manual));