From 4b0f83a12be57c98d345b23374fc9884fd11b3b8 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 7 Dec 2017 23:33:36 -0500 Subject: [PATCH] Finish renaming Object\Item to Object\Post --- include/conversation.php | 10 +++++----- src/Object/Conversation.php | 4 ++-- src/Object/Item.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 2543a5170e..e4e633f5a3 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -8,9 +8,9 @@ use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Core\System; use Friendica\Database\DBM; -use Friendica\Object\Contact; -use Friendica\Object\Conversation; -use Friendica\Object\Item; +use Friendica\Model\Contact; +use Friendica\Object\Thread; +use Friendica\Object\Post; require_once "include/bbcode.php"; require_once "include/acl_selectors.php"; @@ -880,8 +880,8 @@ function conversation(App $a, $items, $mode, $update, $preview = false) { $item['pagedrop'] = $page_dropping; if ($item['id'] == $item['parent']) { - $item_object = new Item($item); - $conv->addThread($item_object); + $item_object = new Post($item); + $conv->addParent($item_object); } } diff --git a/src/Object/Conversation.php b/src/Object/Conversation.php index 3721086f96..f09964ff2c 100644 --- a/src/Object/Conversation.php +++ b/src/Object/Conversation.php @@ -5,7 +5,7 @@ namespace Friendica\Object; use Friendica\BaseObject; -use Friendica\Object\Item; +use Friendica\Object\Post; require_once 'boot.php'; require_once 'include/text.php'; @@ -120,7 +120,7 @@ class Conversation extends BaseObject * @return mixed The inserted item on success * false on failure */ - public function addThread($item) + public function addParent(Post $item) { $item_id = $item->getId(); diff --git a/src/Object/Item.php b/src/Object/Item.php index 1533908aeb..4bb918d0ee 100644 --- a/src/Object/Item.php +++ b/src/Object/Item.php @@ -46,7 +46,7 @@ class Item extends BaseObject * * @param array $data data array */ - public function __construct($data) + public function __construct(array $data) { $a = self::getApp();