From: Michael Date: Thu, 5 Mar 2020 08:03:05 +0000 (+0000) Subject: Function renamed to better reflect the purpose X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a55057d97434c92cf12233869496e12b620ff3c9;p=friendica.git Function renamed to better reflect the purpose --- diff --git a/include/api.php b/include/api.php index 3a29184ec7..ef73889126 100644 --- a/include/api.php +++ b/include/api.php @@ -5823,7 +5823,7 @@ function api_friendica_activity($type) $id = $_REQUEST['id'] ?? 0; - $res = Item::performLike($id, $verb); + $res = Item::performActivity($id, $verb); if ($res) { if ($type == "xml") { diff --git a/mod/subthread.php b/mod/subthread.php index 24b20d49dc..ebec978c59 100644 --- a/mod/subthread.php +++ b/mod/subthread.php @@ -34,7 +34,7 @@ function subthread_content(App $a) $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(); } diff --git a/src/Model/Item.php b/src/Model/Item.php index 5a1e957db8..f3b27ac80f 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3141,7 +3141,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; diff --git a/src/Module/Like.php b/src/Module/Like.php index a85044714f..c926012f18 100644 --- a/src/Module/Like.php +++ b/src/Module/Like.php @@ -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(); }