Fix two minor Differential issues
Summary: - D6966 accidentally reversed the order of `$diffs`. Reverse it back. - The new policy header stuff returns `array(icon, text)` but gets `strlen()`'d by a caller. Silence that warning for now. Test Plan: Created a revision with several diffs. Saw them in the right order; saw no warning on the diff attach screen. Reviewers: chad, btrahan Reviewed By: chad CC: aran, mbishopim3 Differential Revision: https://secure.phabricator.com/D7023
This commit is contained in:
@@ -33,6 +33,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||
->setViewer($request->getUser())
|
||||
->withRevisionIDs(array($this->revisionID))
|
||||
->execute();
|
||||
$diffs = array_reverse($diffs);
|
||||
|
||||
if (!$diffs) {
|
||||
throw new Exception(
|
||||
|
||||
@@ -19,7 +19,9 @@ final class DifferentialDiffViewPolicyFieldSpecification
|
||||
$user,
|
||||
$diff);
|
||||
|
||||
return idx($descriptions, PhabricatorPolicyCapability::CAN_VIEW);
|
||||
// TODO: Clean this up with new policy UI.
|
||||
$policy = idx($descriptions, PhabricatorPolicyCapability::CAN_VIEW);
|
||||
return $policy[1];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user