]> git.mxchange.org Git - friendica.git/blobdiff - mod/editpost.php
Replace "notice" calls
[friendica.git] / mod / editpost.php
index 9f9041811e3875a7b2e52f3d7892cc6fa2f91b1e..8d2160fde059af098008429707ee8c75c6f15dd3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -35,14 +35,14 @@ function editpost_content(App $a)
        $o = '';
 
        if (!local_user()) {
-               notice(DI::l10n()->t('Permission denied.'));
+               DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
                return;
        }
 
        $post_id = ((DI::args()->getArgc() > 1) ? intval(DI::args()->getArgv()[1]) : 0);
 
        if (!$post_id) {
-               notice(DI::l10n()->t('Item not found'));
+               DI::sysmsg()->addNotice(DI::l10n()->t('Item not found'));
                return;
        }
 
@@ -52,7 +52,7 @@ function editpost_content(App $a)
        $item = Post::selectFirstForUser(local_user(), $fields, ['id' => $post_id, 'uid' => local_user()]);
 
        if (!DBA::isResult($item)) {
-               notice(DI::l10n()->t('Item not found'));
+               DI::sysmsg()->addNotice(DI::l10n()->t('Item not found'));
                return;
        }
 
@@ -83,7 +83,7 @@ function editpost_content(App $a)
 
        Hook::callAll('jot_tool', $jotplugins);
 
-       $tpl = Renderer::getMarkupTemplate("jot.tpl");
+       $tpl = Renderer::getMarkupTemplate('jot.tpl');
        $o .= Renderer::replaceMacros($tpl, [
                '$is_edit' => true,
                '$return_path' => '/display/' . $item['guid'],