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:
epriestley
2013-09-18 08:57:16 -07:00
parent d3de57716a
commit 209edcd75a
2 changed files with 4 additions and 1 deletions

View File

@@ -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(

View File

@@ -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];
}
}