mirror of
https://github.com/friendica/friendica
synced 2024-11-18 02:23:40 +00:00
Function renamed to better reflect the purpose
This commit is contained in:
parent
825a7f9f93
commit
a55057d974
4 changed files with 4 additions and 4 deletions
|
@ -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") {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue