]> git.mxchange.org Git - friendica.git/commitdiff
Replace references of GET mod/substhread with POST item/{id}/follow
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 30 Jan 2021 20:51:27 +0000 (15:51 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 31 Jan 2021 22:36:18 +0000 (17:36 -0500)
include/conversation.php
view/js/main.js
view/theme/frio/templates/search_item.tpl
view/theme/frio/templates/wall_thread.tpl
view/theme/frio/theme.php

index b2353db2a36a23fb3bb6afb4a5db1549e6058221..5b49bc9dc1297eb3fb43296476b0ce0fcefb9dea 100644 (file)
@@ -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'],
index 0b9c1da283e2a526c16f06071494ebb8bf729ecb..4db78f6652827edb8c6675139428a30245e9f919 100644 (file)
@@ -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;
 }
 
index bcd957396b4f0471c3c2e254509c46c91f32b708..2791a670b3ddea0bbe07c6cef9a545f09b4512cd 100644 (file)
 
 
                                {{* 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}}
                                        <span role="presentation" class="separator"></span>
                                        <span class="more-links btn-group{{if $item.thread_level > 1}} dropup{{/if}}">
                                                <button type="button" class="btn-link dropdown-toggle" data-toggle="dropdown" id="dropdownMenuOptions-{{$item.id}}" aria-haspopup="true" aria-expanded="false" title="{{$item.menu}}"><i class="fa fa-ellipsis-h" aria-hidden="true"></i>&nbsp;{{$item.menu}}</button>
                                                        </li>
                                                {{/if}}
 
-                                               {{if $item.subthread}}
+                                               {{if $item.follow_thread}}
                                                        <li role="menuitem">
-                                                               <a id="subthread-{{$item.id}}" href="javascript:{{$item.subthread.action}}" class="btn-link" title="{{$item.subthread.title}}"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp;{{$item.subthread.title}}</a>
+                                                               <a id="follow_thread-{{$item.id}}" href="javascript:{{$item.follow_thread.action}}" class="btn-link" title="{{$item.follow_thread.title}}"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp;{{$item.follow_thread.title}}</a>
                                                        </li>
                                                {{/if}}
 
                                                </li>
                                                {{/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)}}
                                                        <li role="separator" class="divider"></li>
                                                {{/if}}
 
index 34d2a73747a937e3d8a76d47171ffec225484136..52a0e7c486c74dc7bd34bcd81a9e111e3187b358 100644 (file)
@@ -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}}
                                <span role="presentation" class="separator"></span>
                                <span class="more-links btn-group{{if $item.thread_level > 1}} dropup{{/if}}">
                                        <button type="button" class="btn-link dropdown-toggle" data-toggle="dropdown" id="dropdownMenuOptions-{{$item.id}}" aria-haspopup="true" aria-expanded="false" title="{{$item.menu}}"><i class="fa fa-ellipsis-h" aria-hidden="true"></i>&nbsp;{{$item.menu}}</button>
@@ -363,9 +363,9 @@ as the value of $top_child_total (this is done at the end of this file)
                                                </li>
                                                {{/if}}
 
-                                               {{if $item.subthread}}
+                                               {{if $item.follow_thread}}
                                                <li role="menuitem">
-                                                       <a id="subthread-{{$item.id}}" href="javascript:{{$item.subthread.action}}" class="btn-link" title="{{$item.subthread.title}}"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp;{{$item.subthread.title}}</a>
+                                                       <a id="follow_thread-{{$item.id}}" href="javascript:{{$item.follow_thread.action}}" class="btn-link" title="{{$item.follow_thread.title}}"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp;{{$item.follow_thread.title}}</a>
                                                </li>
                                                {{/if}}
 
@@ -375,7 +375,7 @@ as the value of $top_child_total (this is done at the end of this file)
                                                </li>
                                                {{/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)}}
                                                <li role="separator" class="divider"></li>
                                                {{/if}}
 
@@ -492,7 +492,7 @@ as the value of $top_child_total (this is done at the end of this file)
                                </div>
                        {{/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}}
                                <div class="more-links btn-group{{if $item.thread_level > 1}} dropup{{/if}}">
                                        <button type="button" class="btn btn-sm dropdown-toggle" data-toggle="dropdown" id="dropdownMenuOptions-{{$item.id}}" aria-haspopup="true" aria-expanded="false" title="{{$item.menu}}"><i class="fa fa-ellipsis-h" aria-hidden="true"></i></button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dropdownMenuOptions-{{$item.id}}">
@@ -528,9 +528,9 @@ as the value of $top_child_total (this is done at the end of this file)
                                                </li>
                                                {{/if}}
 
-                                               {{if $item.subthread}}
+                                               {{if $item.follow_thread}}
                                                        <li role="menuitem">
-                                                       <a id="subthread-{{$item.id}}" href="javascript:{{$item.subthread.action}}" class="btn-link" title="{{$item.subthread.title}}"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp;{{$item.subthread.title}}</a>
+                                                       <a id="follow_thread-{{$item.id}}" href="javascript:{{$item.follow_thread.action}}" class="btn-link" title="{{$item.follow_thread.title}}"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp;{{$item.follow_thread.title}}</a>
                                                </li>
                                                {{/if}}
 
index 4c37e42e734518a7c5d1f6e251edf2bfdda4f1f7..38efc700785b398042d2b2d860d266dc1b497618 100644 (file)
@@ -308,20 +308,20 @@ function frio_acl_lookup(App $a, &$results)
  */
 function frio_display_item(App $a, &$arr)
 {
-       // Add subthread to the item menu
-       $subthread = [];
+       // Add follow to the item menu
+       $followThread = [];
        if (
                local_user()
                && local_user() == $arr['item']['uid']
                && $arr['item']['gravity'] == GRAVITY_PARENT
                && !$arr['item']['self'])
        {
-               $subthread = [
+               $followThread = [
                        'menu'   => 'follow_thread',
                        'title'  => DI::l10n()->t('Follow Thread'),
-                       'action' => 'dosubthread(' . $arr['item']['id'] . ');',
+                       'action' => 'doFollowThread(' . $arr['item']['id'] . ');',
                        'href'   => '#'
                ];
        }
-       $arr['output']['subthread'] = $subthread;
+       $arr['output']['follow_thread'] = $followThread;
 }