]> git.mxchange.org Git - friendica.git/commitdiff
Like on uid=0 does work now
authorMichael <heluecht@pirati.ca>
Wed, 27 Dec 2017 22:21:40 +0000 (22:21 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 27 Dec 2017 22:21:40 +0000 (22:21 +0000)
include/like.php
src/Worker/Notifier.php

index 31698658a2c359572bdd7eb456341903f4a97b22..8b8759c2f6401b90061cb6c90092d306e3f50c0d 100644 (file)
@@ -151,7 +151,7 @@ function do_like($item_id, $verb) {
                AND (`parent` = '%s' OR `parent-uri` = '%s' OR `thr-parent` = '%s')
                LIMIT 1",
                intval($author_contact['id']),
-               intval($uid),
+               intval($item['uid']),
                dbesc($item_id), dbesc($item_id), dbesc($item['uri'])
        );
 
@@ -210,8 +210,8 @@ EOT;
 
        $new_item = array(
                'guid'          => get_guid(32),
-               'uri'           => item_new_uri($a->get_hostname(), $uid),
-               'uid'           => $uid,
+               'uri'           => item_new_uri($a->get_hostname(), $item['uid']),
+               'uid'           => $item['uid'],
                'contact-id'    => $item_contact_id,
                'type'          => 'activity',
                'wall'          => $item['wall'],
index 78daae27521a448757c8a9fa337b437be4bb4e19..5c86a95efe26e8407356996bb4d5e9955986a5f7 100644 (file)
@@ -154,12 +154,10 @@ class Notifier {
                                FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d AND visible AND NOT moderated ORDER BY `id` ASC",
                                intval($parent_id)
                        );
-logger('Blubb: a-'.$item_id);
 
                        if (!count($items)) {
                                return;
                        }
-logger('Blubb: b-'.$item_id);
 
                        // avoid race condition with deleting entries
                        if ($items[0]['deleted']) {
@@ -173,13 +171,11 @@ logger('Blubb: b-'.$item_id);
                                $top_level = true;
                        }
                }
-logger('Blubb: 0-'.$item_id.' - '.$uid);
 
                $owner = User::getOwnerDataById($uid);
                if (!$owner) {
                        return;
                }
-logger('Blubb: 1-'.$item_id);
 
                $walltowall = ($top_level && ($owner['id'] != $items[0]['contact-id']) ? true : false);
 
@@ -197,14 +193,12 @@ logger('Blubb: 1-'.$item_id);
 
                // fill this in with a single salmon slap if applicable
                $slap = '';
-logger('Blubb: 2-'.$item_id);
 
                if (! ($mail || $fsuggest || $relocate)) {
 
                        $slap = OStatus::salmon($target_item, $owner);
 
                        $parent = $items[0];
-logger('Blubb: 3-'.$item_id);
 
                        $thr_parent = q("SELECT `network`, `author-link`, `owner-link` FROM `item` WHERE `uri` = '%s' AND `uid` = %d",
                                dbesc($target_item["thr-parent"]), intval($target_item["uid"]));