@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<?php
2
3/**
4 * When actions happen over a JX.Workflow, we may want to reload the page
5 * if the action is javascript-driven but redirect if it isn't. This preserves
6 * query parameters in the javascript case. A reload response behaves like
7 * a redirect response but causes a page reload when received via workflow.
8 */
9final class AphrontReloadResponse extends AphrontRedirectResponse {
10
11 public function getURI() {
12 if ($this->getRequest()->isAjax()) {
13 return null;
14 } else {
15 return parent::getURI();
16 }
17 }
18
19}