]> git.mxchange.org Git - friendica.git/blobdiff - mod/notes.php
Merge branch 'develop' into rewrite/gravity-constants
[friendica.git] / mod / notes.php
index 11ec8a035230b6005351c6466a052eb7155103c0..2c23e7aaa6ecf3d0e8d71de5e01b9eb8d9870c80 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
  *
@@ -38,10 +38,10 @@ function notes_init(App $a)
 }
 
 
-function notes_content(App $a, $update = false)
+function notes_content(App $a, bool $update = false)
 {
        if (!local_user()) {
-               notice(DI::l10n()->t('Permission denied.'));
+               DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
                return;
        }
 
@@ -57,10 +57,10 @@ function notes_content(App $a, $update = false)
                        'acl_data' => '',
                ];
 
-               $o .= status_editor($a, $x, $a->getContactId());
+               $o .= DI::conversation()->statusEditor($x, $a->getContactId());
        }
 
-       $condition = ['uid' => local_user(), 'post-type' => Item::PT_PERSONAL_NOTE, 'gravity' => GRAVITY_PARENT,
+       $condition = ['uid' => local_user(), 'post-type' => Item::PT_PERSONAL_NOTE, 'gravity' => Item::GRAVITY_PARENT,
                'contact-id'=> $a->getContactId()];
 
        if (DI::mode()->isMobile()) {
@@ -84,7 +84,7 @@ function notes_content(App $a, $update = false)
 
                $count = count($notes);
 
-               $o .= conversation($a, $notes, 'notes', $update);
+               $o .= DI::conversation()->create($notes, 'notes', $update);
        }
 
        $o .= $pager->renderMinimal($count);