The conversation functionality moved to a class
This commit is contained in:
parent
c9e30ac2c0
commit
0ad904c185
24 changed files with 1545 additions and 1494 deletions
|
@ -272,7 +272,7 @@ function display_content(App $a, $update = false, $update_uid = 0)
|
|||
|
||||
// We need the editor here to be able to reshare an item.
|
||||
if ($is_owner && !$update) {
|
||||
$o .= status_editor($a, [], 0, true);
|
||||
$o .= DI::conversation()->statusEditor([], 0, true);
|
||||
}
|
||||
$sql_extra = Item::getPermissionsSQLByUserId($page_uid);
|
||||
|
||||
|
@ -306,7 +306,7 @@ function display_content(App $a, $update = false, $update_uid = 0)
|
|||
$o .= "<script> var netargs = '?uri_id=" . $item['uri-id'] . "'; </script>";
|
||||
}
|
||||
|
||||
$o .= conversation($a, [$item], 'display', $update_uid, false, 'commented', $item_uid);
|
||||
$o .= DI::conversation()->create([$item], 'display', $update_uid, false, 'commented', $item_uid);
|
||||
|
||||
// Preparing the meta header
|
||||
$description = trim(BBCode::toPlaintext($item['body']));
|
||||
|
|
|
@ -677,7 +677,7 @@ function item_post(App $a) {
|
|||
$datarray["uri-id"] = -1;
|
||||
$datarray["author-network"] = Protocol::DFRN;
|
||||
|
||||
$o = conversation($a, [array_merge($contact_record, $datarray)], 'search', false, true);
|
||||
$o = DI::conversation()->create([array_merge($contact_record, $datarray)], 'search', false, true);
|
||||
|
||||
System::jsonExit(['preview' => $o]);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ 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,
|
||||
|
@ -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);
|
||||
|
|
|
@ -1394,15 +1394,15 @@ function photos_content(App $a)
|
|||
// display comments
|
||||
if (DBA::isResult($items)) {
|
||||
foreach ($items as $item) {
|
||||
builtin_activity_puller($item, $conv_responses);
|
||||
DI::conversation()->builtinActivityPuller($item, $conv_responses);
|
||||
}
|
||||
|
||||
if (!empty($conv_responses['like'][$link_item['uri']])) {
|
||||
$like = format_activity($conv_responses['like'][$link_item['uri']]['links'], 'like', $link_item['id']);
|
||||
$like = DI::conversation()->formatActivity($conv_responses['like'][$link_item['uri']]['links'], 'like', $link_item['id']);
|
||||
}
|
||||
|
||||
if (!empty($conv_responses['dislike'][$link_item['uri']])) {
|
||||
$dislike = format_activity($conv_responses['dislike'][$link_item['uri']]['links'], 'dislike', $link_item['id']);
|
||||
$dislike = DI::conversation()->formatActivity($conv_responses['dislike'][$link_item['uri']]['links'], 'dislike', $link_item['id']);
|
||||
}
|
||||
|
||||
if (($can_post || Security::canWriteToUserWall($owner_uid))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue