]> git.mxchange.org Git - friendica.git/commitdiff
The notes are now fetching their content from a central function
authorMichael <heluecht@pirati.ca>
Tue, 21 Aug 2018 07:35:22 +0000 (07:35 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 21 Aug 2018 07:35:22 +0000 (07:35 +0000)
include/conversation.php
mod/notes.php

index 90b5da5994cdb190b6f593df60fb753ebfd020d6..5a26700fd7e1c8378eaa85523b0eff5df2c5937a 100644 (file)
@@ -491,6 +491,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
                        }
                }
        } elseif ($mode === 'notes') {
+               $items = conversation_add_children($items, false, $order, $uid);
                $profile_owner = local_user();
 
                if (!$update) {
index 608d01cf8c63fbf1ed718788ab0eba5f5ffd3db6..68a870e9d689f282aa4c1a93444bb1d1a3fa68c4 100644 (file)
@@ -65,26 +65,13 @@ function notes_content(App $a, $update = false)
 
        $params = ['order' => ['created' => true],
                'limit' => [$a->pager['start'], $a->pager['itemspage']]];
-       $r = Item::selectForUser(local_user(), ['id'], $condition, $params);
+       $r = Item::selectThreadForUser(local_user(), ['uri'], $condition, $params);
 
        $count = 0;
 
        if (DBA::isResult($r)) {
                $count = count($r);
-               $parents_arr = [];
-
-               while ($rr = Item::fetch($r)) {
-                       $parents_arr[] = $rr['id'];
-               }
-               DBA::close($r);
-
-               $condition = ['uid' => local_user(), 'parent' => $parents_arr];
-               $result = Item::selectForUser(local_user(), [], $condition);
-
-               if (DBA::isResult($result)) {
-                       $items = conv_sort(Item::inArray($result), 'commented');
-                       $o .= conversation($a, $items, 'notes', $update);
-               }
+               $o .= conversation($a, DBA::toArray($r), 'notes', $update);
        }
 
        $o .= alt_pager($a, $count);