X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Factivitymover.php;h=d5edab5caacb007b73c9fb9745a82a5c3aace820;hb=360492472c7f5424670b01541ebc4ddc87ff27e3;hp=3380a92c82fd50427e856a4648fcd2005e924628;hpb=36b331d469b6dcd1101783f21265f7be624bc58f;p=quix0rs-gnu-social.git diff --git a/lib/activitymover.php b/lib/activitymover.php index 3380a92c82..d5edab5caa 100644 --- a/lib/activitymover.php +++ b/lib/activitymover.php @@ -55,7 +55,7 @@ class ActivityMover extends QueueHandler { list ($act, $sink, $userURI, $remoteURI) = $data; - $user = User::staticGet('uri', $userURI); + $user = User::getKV('uri', $userURI); $remote = Profile::fromURI($remoteURI); try { @@ -81,7 +81,7 @@ class ActivityMover extends QueueHandler function moveActivity($act, $sink, $user, $remote) { if (empty($user)) { - // TRANS: Exception thrown if no user is provided. %s is a user ID. + // TRANS: Exception thrown if a non-existing user is provided. %s is a user ID. throw new Exception(sprintf(_('No such user "%s".'),$act->actor->id)); } @@ -92,7 +92,7 @@ class ActivityMover extends QueueHandler "{$act->actor->id} to {$remote->nickname}."); // push it, then delete local $sink->postActivity($act); - $notice = Notice::staticGet('uri', $act->objects[0]->id); + $notice = Notice::getKV('uri', $act->objects[0]->id); if (!empty($notice)) { $fave = Fave::pkeyGet(array('user_id' => $user->id, 'notice_id' => $notice->id)); @@ -105,7 +105,7 @@ class ActivityMover extends QueueHandler "{$act->actor->id} to {$remote->nickname}."); // XXX: send a reshare, not a post $sink->postActivity($act); - $notice = Notice::staticGet('uri', $act->objects[0]->id); + $notice = Notice::getKV('uri', $act->objects[0]->id); if (!empty($notice)) { $notice->delete(); } @@ -115,7 +115,7 @@ class ActivityMover extends QueueHandler "Moving group join of {$act->objects[0]->id} by ". "{$act->actor->id} to {$remote->nickname}."); $sink->postActivity($act); - $group = User_group::staticGet('uri', $act->objects[0]->id); + $group = User_group::getKV('uri', $act->objects[0]->id); if (!empty($group)) { $user->leaveGroup($group); } @@ -131,7 +131,7 @@ class ActivityMover extends QueueHandler Subscription::cancel($user->getProfile(), $other); } } else { - $otherUser = User::staticGet('uri', $act->actor->id); + $otherUser = User::getKV('uri', $act->actor->id); if (!empty($otherUser)) { $this->log(LOG_INFO, "Changing sub to {$act->objects[0]->id}".