2011-05-16 20:43:39 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* When actions happen over a JX.Workflow, we may want to reload the page
|
|
|
|
* if the action is javascript-driven but redirect if it isn't. This preserves
|
|
|
|
* query parameters in the javascript case. A reload response behaves like
|
|
|
|
* a redirect response but causes a page reload when received via workflow.
|
|
|
|
*
|
|
|
|
* @group aphront
|
|
|
|
*/
|
2012-03-13 19:18:11 +01:00
|
|
|
final class AphrontReloadResponse extends AphrontRedirectResponse {
|
2011-05-16 20:43:39 +02:00
|
|
|
|
|
|
|
public function getURI() {
|
|
|
|
if ($this->getRequest()->isAjax()) {
|
|
|
|
return null;
|
|
|
|
} else {
|
|
|
|
return parent::getURI();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|