Refactor deprecated App::isAjax() to DI::mode()->isAjax()

This commit is contained in:
nupplaPhil 2019-12-16 00:30:39 +01:00
parent 8e6973b774
commit 8b6e123b3f
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
7 changed files with 12 additions and 17 deletions

View file

@ -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 {