Refactor deprecated App::isAjax() to DI::mode()->isAjax()
This commit is contained in:
@@ -32,7 +32,7 @@ class Details extends BaseAdminModule
|
||||
|
||||
info(L10n::t('Theme settings updated.'));
|
||||
|
||||
if ($a->isAjax()) {
|
||||
if (DI::mode()->isAjax()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class Embed extends BaseAdminModule
|
||||
|
||||
info(L10n::t('Theme settings updated.'));
|
||||
|
||||
if ($a->isAjax()) {
|
||||
if (DI::mode()->isAjax()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class ItemBody extends BaseModule
|
||||
$item = Item::selectFirst(['body'], ['uid' => local_user(), 'id' => $itemId]);
|
||||
|
||||
if (!empty($item)) {
|
||||
if ($app->isAjax()) {
|
||||
if (DI::mode()->isAjax()) {
|
||||
echo str_replace("\n", '<br />', $item['body']);
|
||||
exit();
|
||||
} else {
|
||||
|
||||
@@ -24,7 +24,7 @@ class Group extends BaseModule
|
||||
{
|
||||
$a = DI::app();
|
||||
|
||||
if ($a->isAjax()) {
|
||||
if (DI::mode()->isAjax()) {
|
||||
self::ajaxPost();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user