mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +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:
parent
9c6969e810
commit
c9b0d107f0
3 changed files with 7 additions and 21 deletions
|
@ -333,8 +333,8 @@ final class PhabricatorPolicyExplainController
|
|||
->appendList(
|
||||
array(
|
||||
PhabricatorPolicy::getPolicyExplanation(
|
||||
$viewer,
|
||||
$policy->getPHID()),
|
||||
$viewer,
|
||||
$policy->getPHID()),
|
||||
));
|
||||
|
||||
$strength = $this->getStrengthInformation($object, $policy, $capability);
|
||||
|
|
|
@ -43,13 +43,12 @@ final class PhabricatorPolicyQuery
|
|||
|
||||
public static function renderPolicyDescriptions(
|
||||
PhabricatorUser $viewer,
|
||||
PhabricatorPolicyInterface $object,
|
||||
$icon = false) {
|
||||
PhabricatorPolicyInterface $object) {
|
||||
|
||||
$policies = self::loadPolicies($viewer, $object);
|
||||
|
||||
foreach ($policies as $capability => $policy) {
|
||||
$policies[$capability] = $policy->renderDescription($icon);
|
||||
$policies[$capability] = $policy->renderDescription();
|
||||
}
|
||||
|
||||
return $policies;
|
||||
|
|
|
@ -276,13 +276,7 @@ final class PhabricatorPolicy
|
|||
}
|
||||
}
|
||||
|
||||
public function renderDescription($icon = false) {
|
||||
$img = null;
|
||||
if ($icon) {
|
||||
$img = id(new PHUIIconView())
|
||||
->setIcon($this->getIcon());
|
||||
}
|
||||
|
||||
public function renderDescription() {
|
||||
if ($this->getHref()) {
|
||||
$desc = javelin_tag(
|
||||
'a',
|
||||
|
@ -291,16 +285,9 @@ final class PhabricatorPolicy
|
|||
'class' => 'policy-link',
|
||||
'sigil' => $this->getWorkflow() ? 'workflow' : null,
|
||||
),
|
||||
array(
|
||||
$img,
|
||||
$this->getName(),
|
||||
));
|
||||
$this->getName());
|
||||
} else {
|
||||
if ($img) {
|
||||
$desc = array($img, $this->getName());
|
||||
} else {
|
||||
$desc = $this->getName();
|
||||
}
|
||||
$desc = $this->getName();
|
||||
}
|
||||
|
||||
switch ($this->getType()) {
|
||||
|
|
Loading…
Reference in a new issue