Merge pull request #8366 from annando/issue-8321
Issue 8321: Follow items now work again
This commit is contained in:
+5
-1
@@ -3140,7 +3140,7 @@ class Item
|
||||
* array $arr
|
||||
* 'post_id' => ID of posted item
|
||||
*/
|
||||
public static function performLike($item_id, $verb)
|
||||
public static function performActivity($item_id, $verb)
|
||||
{
|
||||
if (!Session::isAuthenticated()) {
|
||||
return false;
|
||||
@@ -3167,6 +3167,10 @@ class Item
|
||||
case 'unattendmaybe':
|
||||
$activity = Activity::ATTENDMAYBE;
|
||||
break;
|
||||
case 'follow':
|
||||
case 'unfollow':
|
||||
$activity = Activity::FOLLOW;
|
||||
break;
|
||||
default:
|
||||
Logger::log('like: unknown verb ' . $verb . ' for item ' . $item_id);
|
||||
return false;
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ class Like extends BaseModule
|
||||
// @TODO: Replace with parameter from router
|
||||
$itemId = (($app->argc > 1) ? Strings::escapeTags(trim($app->argv[1])) : 0);
|
||||
|
||||
if (!Item::performLike($itemId, $verb)) {
|
||||
if (!Item::performActivity($itemId, $verb)) {
|
||||
throw new HTTPException\BadRequestException();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user