1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 22:40:55 +01:00

Remove unused "icon" parameter from policy name rendering

Summary: Ref T13411. This pathway has an unused "icon" parameter with no callsites. Throw it away to ease refactoring.

Test Plan: Grepped for callsites, found none using this parameter.

Maniphest Tasks: T13411

Differential Revision: https://secure.phabricator.com/D20803
This commit is contained in:
epriestley 2019-09-11 22:01:20 -07:00
parent 9c6969e810
commit c9b0d107f0
3 changed files with 7 additions and 21 deletions

View file

@ -333,8 +333,8 @@ final class PhabricatorPolicyExplainController
->appendList( ->appendList(
array( array(
PhabricatorPolicy::getPolicyExplanation( PhabricatorPolicy::getPolicyExplanation(
$viewer, $viewer,
$policy->getPHID()), $policy->getPHID()),
)); ));
$strength = $this->getStrengthInformation($object, $policy, $capability); $strength = $this->getStrengthInformation($object, $policy, $capability);

View file

@ -43,13 +43,12 @@ final class PhabricatorPolicyQuery
public static function renderPolicyDescriptions( public static function renderPolicyDescriptions(
PhabricatorUser $viewer, PhabricatorUser $viewer,
PhabricatorPolicyInterface $object, PhabricatorPolicyInterface $object) {
$icon = false) {
$policies = self::loadPolicies($viewer, $object); $policies = self::loadPolicies($viewer, $object);
foreach ($policies as $capability => $policy) { foreach ($policies as $capability => $policy) {
$policies[$capability] = $policy->renderDescription($icon); $policies[$capability] = $policy->renderDescription();
} }
return $policies; return $policies;

View file

@ -276,13 +276,7 @@ final class PhabricatorPolicy
} }
} }
public function renderDescription($icon = false) { public function renderDescription() {
$img = null;
if ($icon) {
$img = id(new PHUIIconView())
->setIcon($this->getIcon());
}
if ($this->getHref()) { if ($this->getHref()) {
$desc = javelin_tag( $desc = javelin_tag(
'a', 'a',
@ -291,16 +285,9 @@ final class PhabricatorPolicy
'class' => 'policy-link', 'class' => 'policy-link',
'sigil' => $this->getWorkflow() ? 'workflow' : null, 'sigil' => $this->getWorkflow() ? 'workflow' : null,
), ),
array( $this->getName());
$img,
$this->getName(),
));
} else { } else {
if ($img) { $desc = $this->getName();
$desc = array($img, $this->getName());
} else {
$desc = $this->getName();
}
} }
switch ($this->getType()) { switch ($this->getType()) {