$id = $_REQUEST['id'] ?? 0;
- $res = Item::performLike($id, $verb);
+ $res = Item::performActivity($id, $verb);
if ($res) {
if ($type == "xml") {
$item_id = (($a->argc > 1) ? Strings::escapeTags(trim($a->argv[1])) : 0);
- if (!Item::performLike($item_id, 'follow')) {
+ if (!Item::performActivity($item_id, 'follow')) {
Logger::info('Following item failed', ['item' => $item_id]);
throw new HTTPException\BadRequestException();
}
* 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;
// @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();
}