mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 14:51:06 +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:
parent
cd4cb12116
commit
14aa70a2e0
2 changed files with 6 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue