From 7f78d6e722a8c101553c557b327a06d9537418dc Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 30 Jan 2021 15:51:27 -0500 Subject: [PATCH] Replace references of GET mod/substhread with POST item/{id}/follow --- include/conversation.php | 2 +- view/js/main.js | 4 ++-- view/theme/frio/templates/search_item.tpl | 8 ++++---- view/theme/frio/templates/wall_thread.tpl | 14 +++++++------- view/theme/frio/theme.php | 10 +++++----- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index b2353db2a3..5b49bc9dc1 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -894,7 +894,7 @@ function item_photo_menu($item) { $ignore_link = ''; if (local_user() && local_user() == $item['uid'] && $item['gravity'] == GRAVITY_PARENT && !$item['self']) { - $sub_link = 'javascript:dosubthread(' . $item['id'] . '); return false;'; + $sub_link = 'javascript:doFollowThread(' . $item['id'] . '); return false;'; } $author = ['uid' => 0, 'id' => $item['author-id'], diff --git a/view/js/main.js b/view/js/main.js index 0b9c1da283..4db78f6652 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -675,10 +675,10 @@ function doActivityItem(ident, verb, un) { update_item = ident.toString(); } -function dosubthread(ident) { +function doFollowThread(ident) { unpause(); $('#like-rotator-' + ident.toString()).show(); - $.get('subthread/' + ident.toString(), NavUpdate); + $.post('item/' + ident.toString() + '/follow', NavUpdate); liking = 1; } diff --git a/view/theme/frio/templates/search_item.tpl b/view/theme/frio/templates/search_item.tpl index bcd957396b..2791a670b3 100644 --- a/view/theme/frio/templates/search_item.tpl +++ b/view/theme/frio/templates/search_item.tpl @@ -174,7 +174,7 @@ {{* Put additional actions in a dropdown menu *}} - {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.subthread || $item.ignore || $item.drop.dropping}} + {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread || $item.ignore || $item.drop.dropping}} @@ -211,9 +211,9 @@ {{/if}} - {{if $item.subthread}} + {{if $item.follow_thread}}
  • -  {{$item.subthread.title}} +  {{$item.follow_thread.title}}
  • {{/if}} @@ -223,7 +223,7 @@ {{/if}} - {{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.subthread) && ($item.ignore || $item.drop.dropping)}} + {{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread) && ($item.ignore || $item.drop.dropping)}} {{/if}} diff --git a/view/theme/frio/templates/wall_thread.tpl b/view/theme/frio/templates/wall_thread.tpl index 34d2a73747..52a0e7c486 100644 --- a/view/theme/frio/templates/wall_thread.tpl +++ b/view/theme/frio/templates/wall_thread.tpl @@ -326,7 +326,7 @@ as the value of $top_child_total (this is done at the end of this file) {{/if}} {{* Put additional actions in a dropdown menu *}} - {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.subthread || $item.ignore || $item.drop.dropping}} + {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread || $item.ignore || $item.drop.dropping}} @@ -363,9 +363,9 @@ as the value of $top_child_total (this is done at the end of this file) {{/if}} - {{if $item.subthread}} + {{if $item.follow_thread}}
  • -  {{$item.subthread.title}} +  {{$item.follow_thread.title}}
  • {{/if}} @@ -375,7 +375,7 @@ as the value of $top_child_total (this is done at the end of this file) {{/if}} - {{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.subthread) && ($item.ignore || $item.drop.dropping)}} + {{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread) && ($item.ignore || $item.drop.dropping)}} {{/if}} @@ -492,7 +492,7 @@ as the value of $top_child_total (this is done at the end of this file) {{/if}} - {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.subthread || $item.ignore || $item.drop.dropping}} + {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread || $item.ignore || $item.drop.dropping}}