@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.

Trivial fixes from D14467

Summary: See D14467. Just teasing this apart so I can be a little more confident in my commandeering. These are the unambiguous cleanup changes from D14467.

Test Plan: inspection / clicked stuff / no impact

Reviewers: chad, joshuaspence

Reviewed By: joshuaspence

Differential Revision: https://secure.phabricator.com/D14868

+13 -9
+11 -8
src/applications/policy/rule/PhabricatorPolicyRule.php
··· 11 11 const CONTROL_TYPE_NONE = 'none'; 12 12 13 13 abstract public function getRuleDescription(); 14 - abstract public function applyRule( 15 - PhabricatorUser $viewer, 16 - $value, 17 - PhabricatorPolicyInterface $object); 18 14 19 15 public function willApplyRules( 20 16 PhabricatorUser $viewer, ··· 22 18 array $objects) { 23 19 return; 24 20 } 21 + 22 + abstract public function applyRule( 23 + PhabricatorUser $viewer, 24 + $value, 25 + PhabricatorPolicyInterface $object); 25 26 26 27 public function getValueControlType() { 27 28 return self::CONTROL_TYPE_TEXT; ··· 35 36 * Return `true` if this rule can be applied to the given object. 36 37 * 37 38 * Some policy rules may only operation on certain kinds of objects. For 38 - * example, a "task author" rule 39 + * example, a "task author" rule can only operate on tasks. 39 40 */ 40 41 public function canApplyToObject(PhabricatorPolicyInterface $object) { 41 42 return true; ··· 43 44 44 45 protected function getDatasourceTemplate( 45 46 PhabricatorTypeaheadDatasource $datasource) { 47 + 46 48 return array( 47 49 'markup' => new AphrontTokenizerTemplateView(), 48 50 'uri' => $datasource->getDatasourceURI(), ··· 65 67 66 68 public function getRequiredHandlePHIDsForSummary($value) { 67 69 $phids = array(); 70 + 68 71 switch ($this->getValueControlType()) { 69 72 case self::CONTROL_TYPE_TOKENIZER: 70 73 $phids = $value; ··· 86 89 } 87 90 88 91 /** 89 - * Return true if the given value creates a rule with a meaningful effect. 92 + * Return `true` if the given value creates a rule with a meaningful effect. 90 93 * An example of a rule with no meaningful effect is a "users" rule with no 91 94 * users specified. 92 95 * ··· 131 134 $cache->setKey(self::getObjectPolicyCacheKey($object, $rule), $hint); 132 135 } 133 136 134 - protected function getTransactionHint( 137 + final protected function getTransactionHint( 135 138 PhabricatorPolicyInterface $object) { 136 139 137 140 $cache = PhabricatorCaches::getRequestCache(); ··· 164 167 return null; 165 168 } 166 169 167 - public function getObjectPolicyFullKey() { 170 + final public function getObjectPolicyFullKey() { 168 171 $key = $this->getObjectPolicyKey(); 169 172 170 173 if (!$key) {
+2 -1
src/applications/project/controller/PhabricatorProjectProfileController.php
··· 91 91 ->setName(pht('Edit Details')) 92 92 ->setIcon('fa-pencil') 93 93 ->setHref($this->getApplicationURI("details/{$id}/")) 94 - ->setDisabled(!$can_edit)); 94 + ->setDisabled(!$can_edit) 95 + ->setWorkflow(!$can_edit)); 95 96 96 97 $view->addAction( 97 98 id(new PhabricatorActionView())