From: Michael Date: Mon, 28 Jan 2019 21:53:13 +0000 (+0000) Subject: Removing the parameter X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d259007f112b6d132aa0b112c7f7111208dd3e56;p=friendica.git Removing the parameter --- diff --git a/src/Object/Post.php b/src/Object/Post.php index 1e3f5bd99d..39c9e7670e 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -771,13 +771,11 @@ class Post extends BaseObject /** * Get default text for the comment box * - * @param integer $parent_id ID of the parent item - * * @return string */ - private function getDefaultText($parent_id) + private function getDefaultText() { - $item = Item::selectFirst(['author-addr'], ['id' => $parent_id]); + $item = Item::selectFirst(['author-addr'], ['id' => $this->getId()]); if (!DBA::isResult($item) || empty($item['author-addr'])) { // Should not happen return ''; @@ -785,7 +783,7 @@ class Post extends BaseObject $text = '@'.$item['author-addr'].' '; - $terms = Term::tagArrayFromItemId($parent_id, TERM_MENTION); + $terms = Term::tagArrayFromItemId($this->getId(), TERM_MENTION); foreach ($terms as $term) { $profile = Contact::getDetailsByURL($term['url']); @@ -833,7 +831,7 @@ class Post extends BaseObject $uid = $conv->getProfileOwner(); $parent_uid = $this->getDataValue('uid'); - $default_text = $this->getDefaultText($this->getId()); + $default_text = $this->getDefaultText(); if (!is_null($parent_uid) && ($uid != $parent_uid)) { $uid = $parent_uid;