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

Fix the incorrect link target for "Create Revision" as a Menu Item

Summary:
Depends on D20359. Fixes T12098. When you add a new "Form" item and pick "Create Revision", you currently get a bad link. This is because Differential is kind of special and the form isn't usable directly, even though Differential does use EditEngine.

Allow EditEngine to specify a different create URI, then specify the web UI paste-a-diff flow to fix this.

Test Plan:
- Added "Create Revision" to a portal, clicked it, was sensibly put on the diff flow.
- Grepped for `getCreateURI()`, the only other real use case is to render the "Create X" dropdowns in the upper right.
- Clicked one of those, still worked great.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T12098

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

+17 -8
+4
src/applications/differential/editor/DifferentialRevisionEditEngine.php
··· 63 63 return $object->getMonogram(); 64 64 } 65 65 66 + public function getCreateURI($form_key) { 67 + return '/differential/diff/create/'; 68 + } 69 + 66 70 protected function getObjectCreateShortText() { 67 71 return pht('Create Revision'); 68 72 }
+12
src/applications/transactions/editengine/PhabricatorEditEngine.php
··· 566 566 return $this->getObjectViewURI($object); 567 567 } 568 568 569 + /** 570 + * @task uri 571 + */ 572 + public function getCreateURI($form_key) { 573 + try { 574 + $create_uri = $this->getEditURI(null, "form/{$form_key}/"); 575 + } catch (Exception $ex) { 576 + $create_uri = null; 577 + } 578 + 579 + return $create_uri; 580 + } 569 581 570 582 /** 571 583 * @task uri
+1 -8
src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php
··· 227 227 public function getCreateURI() { 228 228 $form_key = $this->getIdentifier(); 229 229 $engine = $this->getEngine(); 230 - 231 - try { 232 - $create_uri = $engine->getEditURI(null, "form/{$form_key}/"); 233 - } catch (Exception $ex) { 234 - $create_uri = null; 235 - } 236 - 237 - return $create_uri; 230 + return $engine->getCreateURI($form_key); 238 231 } 239 232 240 233 public function getIdentifier() {