1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-10 23:01:04 +01:00

Only return description in Policy description if no image required

Summary: We were returning an array here when  previous return was a string.

Test Plan: reload diff

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D7025
This commit is contained in:
Chad Little 2013-09-18 12:06:07 -07:00
parent cd4cb12116
commit 14aa70a2e0
2 changed files with 6 additions and 4 deletions

View file

@ -19,9 +19,7 @@ final class DifferentialDiffViewPolicyFieldSpecification
$user,
$diff);
// TODO: Clean this up with new policy UI.
$policy = idx($descriptions, PhabricatorPolicyCapability::CAN_VIEW);
return $policy[1];
return idx($descriptions, PhabricatorPolicyCapability::CAN_VIEW);
}
}

View file

@ -161,7 +161,11 @@ final class PhabricatorPolicy {
$this->getName(),
));
} else {
$desc = array($img, $this->getName());
if ($img) {
$desc = array($img, $this->getName());
} else {
$desc = $this->getName();
}
}
switch ($this->getType()) {