@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 some unusual UI policy hints in Phriction

Summary:
Ref T13077. We currently have these weird policy hints in Phriction that we don't use in other applications. Just remove them for consistency to make the eventual swap to EditEngine a little easier.

Also nuke some unreacahble code.

Test Plan: Loaded edit page, saw more standard UI.

Reviewers: amckinley

Maniphest Tasks: T13077

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

+8 -26
+8 -16
src/applications/phriction/controller/PhrictionEditController.php
··· 226 226 ->execute(); 227 227 $view_capability = PhabricatorPolicyCapability::CAN_VIEW; 228 228 $edit_capability = PhabricatorPolicyCapability::CAN_EDIT; 229 - $codex = id(PhabricatorPolicyCodex::newFromObject($document, $viewer)) 230 - ->setCapability($view_capability); 231 229 232 - $view_capability_description = $codex->getPolicySpecialRuleForCapability( 233 - PhabricatorPolicyCapability::CAN_VIEW)->getDescription(); 234 - $edit_capability_description = $codex->getPolicySpecialRuleForCapability( 235 - PhabricatorPolicyCapability::CAN_EDIT)->getDescription(); 236 230 237 231 $form = id(new AphrontFormView()) 238 232 ->setUser($viewer) ··· 279 273 ->setSpacePHID($v_space) 280 274 ->setPolicyObject($document) 281 275 ->setCapability($view_capability) 282 - ->setPolicies($policies) 283 - ->setCaption($view_capability_description)) 276 + ->setPolicies($policies)) 284 277 ->appendChild( 285 278 id(new AphrontFormPolicyControl()) 286 279 ->setName('editPolicy') 287 280 ->setPolicyObject($document) 288 281 ->setCapability($edit_capability) 289 - ->setPolicies($policies) 290 - ->setCaption($edit_capability_description)) 282 + ->setPolicies($policies)) 291 283 ->appendChild( 292 284 id(new AphrontFormTextControl()) 293 285 ->setLabel(pht('Edit Notes')) ··· 323 315 $crumbs->setBorder(true); 324 316 325 317 $view = id(new PHUITwoColumnView()) 326 - ->setFooter(array( 327 - $draft_note, 328 - $form_box, 329 - $preview, 330 - )); 318 + ->setFooter( 319 + array( 320 + $draft_note, 321 + $form_box, 322 + $preview, 323 + )); 331 324 332 325 return $this->newPage() 333 326 ->setTitle($page_title) 334 327 ->setCrumbs($crumbs) 335 328 ->appendChild($view); 336 - 337 329 } 338 330 339 331 }
-10
src/view/form/control/AphrontFormPolicyControl.php
··· 279 279 ->setIcon($icon); 280 280 } 281 281 282 - 283 282 if ($this->templatePHIDType) { 284 283 $context_path = 'template/'.$this->templatePHIDType.'/'; 285 284 } else { ··· 345 344 )), 346 345 )), 347 346 $input, 348 - )); 349 - 350 - return AphrontFormSelectControl::renderSelectTag( 351 - $this->getValue(), 352 - $this->getOptions(), 353 - array( 354 - 'name' => $this->getName(), 355 - 'disabled' => $this->getDisabled() ? 'disabled' : null, 356 - 'id' => $this->getID(), 357 347 )); 358 348 } 359 349