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

Herald Rule Creation Page: fix Back button in some cases

Summary:
If you want to create a new Herald Rule, sometime,
like for new "Object" Herald Rules, the Back button just
sends you to the very same page you already were.

The risk is that an employee could receive a specific
instruction, such as "Hey Alfreda, Go back, now"
and at this point Alfreda goes into an incredible loop
continuing to click the Back button until the duration
of the universe (since Phorge is so stable that it's able
to handle that "Back spike" forever - really).

https://we.phorge.it/T15184

Note that this also tries to avoid to change the base URI
to just go Back. For example, before this change, the Back
button was trying to send from /create/ to /new/, but
apparently they are just aliases.

Closes T15184

Test Plan:
- Visit the page /herald/create/?adapter=commit
- Click on "Object"
- Click on "Back"
- Verify that you only went back one screen, and not just forward in time

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15184

Differential Revision: https://we.phorge.it/D25087

+2 -2
+2 -2
src/applications/herald/controller/HeraldNewController.php
··· 333 333 $cancel_params = $params; 334 334 unset($cancel_params['type']); 335 335 336 - $cancel_uri = $this->getApplicationURI('new/'); 337 - $cancel_uri = new PhutilURI($cancel_uri, $params); 336 + $cancel_uri = $this->getApplicationURI('create/'); 337 + $cancel_uri = new PhutilURI($cancel_uri, $cancel_params); 338 338 339 339 $form->appendChild( 340 340 id(new AphrontFormSubmitControl())