@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+7 -21
+2 -2
src/applications/policy/controller/PhabricatorPolicyExplainController.php
··· 333 333 ->appendList( 334 334 array( 335 335 PhabricatorPolicy::getPolicyExplanation( 336 - $viewer, 337 - $policy->getPHID()), 336 + $viewer, 337 + $policy->getPHID()), 338 338 )); 339 339 340 340 $strength = $this->getStrengthInformation($object, $policy, $capability);
+2 -3
src/applications/policy/query/PhabricatorPolicyQuery.php
··· 43 43 44 44 public static function renderPolicyDescriptions( 45 45 PhabricatorUser $viewer, 46 - PhabricatorPolicyInterface $object, 47 - $icon = false) { 46 + PhabricatorPolicyInterface $object) { 48 47 49 48 $policies = self::loadPolicies($viewer, $object); 50 49 51 50 foreach ($policies as $capability => $policy) { 52 - $policies[$capability] = $policy->renderDescription($icon); 51 + $policies[$capability] = $policy->renderDescription(); 53 52 } 54 53 55 54 return $policies;
+3 -16
src/applications/policy/storage/PhabricatorPolicy.php
··· 276 276 } 277 277 } 278 278 279 - public function renderDescription($icon = false) { 280 - $img = null; 281 - if ($icon) { 282 - $img = id(new PHUIIconView()) 283 - ->setIcon($this->getIcon()); 284 - } 285 - 279 + public function renderDescription() { 286 280 if ($this->getHref()) { 287 281 $desc = javelin_tag( 288 282 'a', ··· 291 285 'class' => 'policy-link', 292 286 'sigil' => $this->getWorkflow() ? 'workflow' : null, 293 287 ), 294 - array( 295 - $img, 296 - $this->getName(), 297 - )); 288 + $this->getName()); 298 289 } else { 299 - if ($img) { 300 - $desc = array($img, $this->getName()); 301 - } else { 302 - $desc = $this->getName(); 303 - } 290 + $desc = $this->getName(); 304 291 } 305 292 306 293 switch ($this->getType()) {