mirror of
https://github.com/friendica/friendica
synced 2025-04-22 07:50:11 +00:00
Refactor deprecated App::isAjax() to DI::mode()->isAjax()
This commit is contained in:
parent
8e6973b774
commit
8b6e123b3f
7 changed files with 12 additions and 17 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue