]> git.mxchange.org Git - friendica.git/commitdiff
Issue 5797: Retweets are now displayed again via API
authorMichael <heluecht@pirati.ca>
Mon, 1 Oct 2018 18:16:19 +0000 (18:16 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 1 Oct 2018 18:16:19 +0000 (18:16 +0000)
include/api.php

index bacdd85143213b18c96f6f9028881405f6567f1e..cf5fdc29cd1051a2f9b705441583983786be7fdd 100644 (file)
@@ -2732,7 +2732,7 @@ function api_contactlink_to_array($txt)
  *                     likes => int count,
  *                     dislikes => int count
  */
-function api_format_items_activities(&$item, $type = "json")
+function api_format_items_activities($item, $type = "json")
 {
        $a = get_app();
 
@@ -2747,13 +2747,13 @@ function api_format_items_activities(&$item, $type = "json")
        $condition = ['uid' => $item['uid'], 'thr-parent' => $item['uri']];
        $ret = Item::selectForUser($item['uid'], ['author-id', 'verb'], $condition);
 
-       while ($item = Item::fetch($ret)) {
+       while ($parent_item = Item::fetch($ret)) {
                // not used as result should be structured like other user data
                //builtin_activity_puller($i, $activities);
 
                // get user data and add it to the array of the activity
-               $user = api_get_user($a, $item['author-id']);
-               switch ($item['verb']) {
+               $user = api_get_user($a, $parent_item['author-id']);
+               switch ($parent_item['verb']) {
                        case ACTIVITY_LIKE:
                                $activities['like'][] = $user;
                                break;