[TASK] Add object option for setting up ajax env
This commit is contained in:
parent
e8ad15ad03
commit
eb0d206673
@ -584,6 +584,7 @@ class ActionController extends BaseController
|
|||||||
->getUriBuilder()
|
->getUriBuilder()
|
||||||
->reset()
|
->reset()
|
||||||
->setCreateAbsoluteUri(true)
|
->setCreateAbsoluteUri(true)
|
||||||
|
->setAddQueryString(true)
|
||||||
->setTargetPageType($this->ajaxPageType)
|
->setTargetPageType($this->ajaxPageType)
|
||||||
->setArguments(['cid' => $this->contentObjectUid])
|
->setArguments(['cid' => $this->contentObjectUid])
|
||||||
->uriFor($this->request->getControllerActionName());
|
->uriFor($this->request->getControllerActionName());
|
||||||
@ -697,9 +698,12 @@ class ActionController extends BaseController
|
|||||||
* @param array $result
|
* @param array $result
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function returnFunction($result = [], $errorStatus = null)
|
protected function returnFunction(
|
||||||
{
|
$result = [],
|
||||||
$this->setAjaxEnv();
|
$errorStatus = null,
|
||||||
|
$object = 'data'
|
||||||
|
) {
|
||||||
|
$this->setAjaxEnv($object);
|
||||||
if ($result == null) {
|
if ($result == null) {
|
||||||
$result = [];
|
$result = [];
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,6 @@ class MailUtility
|
|||||||
$htmlRow['data'] = preg_replace_callback(
|
$htmlRow['data'] = preg_replace_callback(
|
||||||
'/\[.*\]/mU',
|
'/\[.*\]/mU',
|
||||||
function($matches) {
|
function($matches) {
|
||||||
|
|
||||||
foreach ($matches as $match) {
|
foreach ($matches as $match) {
|
||||||
return preg_replace_callback(
|
return preg_replace_callback(
|
||||||
'/\[(\S*)\s(.*)\]/mU',
|
'/\[(\S*)\s(.*)\]/mU',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user