X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Factivitymover.php;h=d5edab5caacb007b73c9fb9745a82a5c3aace820;hb=360492472c7f5424670b01541ebc4ddc87ff27e3;hp=b308ad5624c1188b230cdbece2e2cfb7f3d74c54;hpb=bf121a695a13c2b30abf57ea86afbe1e6c2420a7;p=quix0rs-gnu-social.git diff --git a/lib/activitymover.php b/lib/activitymover.php index b308ad5624..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,8 @@ class ActivityMover extends QueueHandler function moveActivity($act, $sink, $user, $remote) { if (empty($user)) { - throw new Exception(sprintf(_("No such user %s."),$act->actor->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)); } switch ($act->verb) { @@ -91,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)); @@ -104,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(); } @@ -114,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); } @@ -130,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}".