X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Factivitymover.php;h=6d9d77b215e08be1a61d3c2ae2b0d2d026bbe7fd;hb=14fe22e4307044f2eb08264a7b83f9c2de245dba;hp=7032331104c41a3110cf2fce3dcb7494d8acd3a7;hpb=621a7cb36df9e3962aac7b473478c634e97e70e1;p=quix0rs-gnu-social.git diff --git a/lib/activitymover.php b/lib/activitymover.php index 7032331104..6d9d77b215 100644 --- a/lib/activitymover.php +++ b/lib/activitymover.php @@ -4,7 +4,7 @@ * Copyright (C) 2010, StatusNet, Inc. * * Title of module - * + * * PHP version 5 * * This program is free software: you can redistribute it and/or modify @@ -44,14 +44,13 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ - class ActivityMover extends QueueHandler { function transport() { return 'actmove'; } - + function handle($data) { list ($act, $sink, $userURI, $remoteURI) = $data; @@ -82,7 +81,8 @@ class ActivityMover extends QueueHandler function moveActivity($act, $sink, $user, $remote) { if (empty($user)) { - throw new Exception("No such user {$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) { @@ -117,7 +117,7 @@ class ActivityMover extends QueueHandler $sink->postActivity($act); $group = User_group::staticGet('uri', $act->objects[0]->id); if (!empty($group)) { - Group_member::leave($group->id, $user->id); + $user->leaveGroup($group); } break; case ActivityVerb::FOLLOW: @@ -152,7 +152,7 @@ class ActivityMover extends QueueHandler /** * Log some data - * + * * Add a header for our class so we know who did it. * * @param int $level Log level, like LOG_ERR or LOG_INFO @@ -160,7 +160,6 @@ class ActivityMover extends QueueHandler * * @return void */ - protected function log($level, $message) { common_log($level, "ActivityMover: " . $message);