From 37131a6785c70882c7da83d63de13167ff8e5290 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 9 Jul 2023 20:56:51 -0400 Subject: [PATCH] Normalize item action label key name - Remove unused $item.return reference in asynchronous item action URLs --- src/Object/Post.php | 11 ++++------- view/templates/search_item.tpl | 14 +++++++------- view/templates/wall_thread.tpl | 2 +- view/theme/frio/templates/search_item.tpl | 2 +- view/theme/frio/templates/wall_thread.tpl | 11 ++++++----- view/theme/quattro/templates/search_item.tpl | 2 +- view/theme/quattro/templates/wall_item_tag.tpl | 12 ++++++------ view/theme/quattro/templates/wall_thread.tpl | 2 +- view/theme/smoothly/templates/search_item.tpl | 16 ++++++++-------- view/theme/smoothly/templates/wall_thread.tpl | 2 +- view/theme/vier/templates/search_item.tpl | 2 +- view/theme/vier/templates/wall_item_tag.tpl | 12 ++++++------ 12 files changed, 43 insertions(+), 45 deletions(-) diff --git a/src/Object/Post.php b/src/Object/Post.php index 28db238949..915dead940 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -248,9 +248,6 @@ class Post $pinned = DI::l10n()->t('Pinned item'); } - // Showing the one or the other text, depending upon if we can only hide it or really delete it. - $delete = $origin ? DI::l10n()->t('Delete globally') : DI::l10n()->t('Remove locally'); - $drop = false; $block = false; $ignore = false; @@ -260,24 +257,24 @@ class Post 'dropping' => $dropping, 'pagedrop' => $item['pagedrop'], 'select' => DI::l10n()->t('Select'), - 'delete' => $delete, + 'label' => $origin ? DI::l10n()->t('Delete globally') : DI::l10n()->t('Remove locally'), ]; } if (!$item['self'] && DI::userSession()->getLocalUserId()) { $block = [ 'blocking' => true, - 'block' => DI::l10n()->t('Block %s', $item['author-name']), + 'label' => DI::l10n()->t('Block %s', $item['author-name']), 'author_id' => $item['author-id'], ]; $ignore = [ 'ignoring' => true, - 'ignore' => DI::l10n()->t('Ignore %s', $item['author-name']), + 'label' => DI::l10n()->t('Ignore %s', $item['author-name']), 'author_id' => $item['author-id'], ]; $collapse = [ 'collapsing' => true, - 'collapse' => DI::l10n()->t('Collapse %s', $item['author-name']), + 'label' => DI::l10n()->t('Collapse %s', $item['author-name']), 'author_id' => $item['author-id'], ]; } diff --git a/view/templates/search_item.tpl b/view/templates/search_item.tpl index fc322be95e..4320ec6cfc 100644 --- a/view/templates/search_item.tpl +++ b/view/templates/search_item.tpl @@ -7,8 +7,8 @@
-
{{$item.name}} @@ -19,17 +19,17 @@
-
+
{{if $item.lock}}
{{$item.lock}}
- {{else}}
{{/if}} + {{else}}
{{/if}}
{{$item.location_html nofilter}}
{{$item.name}} -
{{$item.pinned}}
-
+
{{$item.pinned}}
+
{{$item.title}}
@@ -46,7 +46,7 @@
- {{if $item.drop && $item.drop.dropping}}{{/if}} + {{if $item.drop && $item.drop.dropping}}{{/if}}
{{if $item.drop && $item.drop.pagedrop}}{{/if}}
diff --git a/view/templates/wall_thread.tpl b/view/templates/wall_thread.tpl index 5e9dd96d61..90218d9119 100644 --- a/view/templates/wall_thread.tpl +++ b/view/templates/wall_thread.tpl @@ -166,7 +166,7 @@ {{/if}} {{if $item.drop && $item.drop.dropping}} - {{$item.drop.delete}} + {{$item.drop.label}} {{/if}} {{if $item.edpost}} {{$item.edpost.1}} diff --git a/view/theme/frio/templates/search_item.tpl b/view/theme/frio/templates/search_item.tpl index 4a3e006aaa..ef02e10641 100644 --- a/view/theme/frio/templates/search_item.tpl +++ b/view/theme/frio/templates/search_item.tpl @@ -245,7 +245,7 @@ {{if $item.drop && $item.drop.dropping}}
  • - {{$item.drop.delete}} + {{$item.drop.label}}
  • {{/if}} diff --git a/view/theme/frio/templates/wall_thread.tpl b/view/theme/frio/templates/wall_thread.tpl index 3e9d19e02d..29e0c64636 100644 --- a/view/theme/frio/templates/wall_thread.tpl +++ b/view/theme/frio/templates/wall_thread.tpl @@ -390,23 +390,24 @@ as the value of $top_child_total (this is done at the end of this file) {{if $item.drop && $item.drop.dropping}}
  • - {{$item.drop.delete}} + {{$item.drop.label}}
  • {{/if}} {{if $item.block}}
  • - {{$item.block.block}} + {{$item.block.label}}
  • {{/if}} {{if $item.ignore_author}}
  • - {{$item.ignore_author.ignore}} + {{$item.ignore_author.label}}
  • {{/if}} {{if $item.collapse}}
  • - {{$item.collapse.collapse}} + {{$item.collapse.label}} +
  • {{/if}} @@ -559,7 +560,7 @@ as the value of $top_child_total (this is done at the end of this file) {{if $item.drop && $item.drop.dropping}}
  • - {{$item.drop.delete}} + {{$item.drop.label}}
  • {{/if}} diff --git a/view/theme/quattro/templates/search_item.tpl b/view/theme/quattro/templates/search_item.tpl index b5c6af7e75..dc89c3e50f 100644 --- a/view/theme/quattro/templates/search_item.tpl +++ b/view/theme/quattro/templates/search_item.tpl @@ -75,7 +75,7 @@ {{/if}} {{if $item.drop && $item.drop.dropping}} - {{$item.drop.delete}} + {{$item.drop.label}} {{/if}} {{if $item.edpost}} diff --git a/view/theme/quattro/templates/wall_item_tag.tpl b/view/theme/quattro/templates/wall_item_tag.tpl index 3aa9d3ad45..023bde9705 100644 --- a/view/theme/quattro/templates/wall_item_tag.tpl +++ b/view/theme/quattro/templates/wall_item_tag.tpl @@ -2,12 +2,12 @@ {{else}} {{if $item.comment_firstcollapsed}}
    - {{$item.num_comments}} - {{$item.hide_text}} - {{if $item.thread_level==3}} - + {{if $item.thread_level==3}} - expand / @@ -32,7 +32,7 @@ - +
    {{$item.location_html nofilter}}
    @@ -44,7 +44,7 @@ {{/if}} {{if $item.drop && $item.drop.dropping}} - {{$item.drop.delete}} + {{$item.drop.label}} {{/if}} diff --git a/view/theme/quattro/templates/wall_thread.tpl b/view/theme/quattro/templates/wall_thread.tpl index 1683f10d03..197ce776f2 100644 --- a/view/theme/quattro/templates/wall_thread.tpl +++ b/view/theme/quattro/templates/wall_thread.tpl @@ -149,7 +149,7 @@ {{/if}} {{if $item.drop && $item.drop.dropping}} - {{$item.drop.delete}} + {{$item.drop.label}} {{/if}} {{if $item.edpost}} diff --git a/view/theme/smoothly/templates/search_item.tpl b/view/theme/smoothly/templates/search_item.tpl index 94d713267b..89d51701a9 100644 --- a/view/theme/smoothly/templates/search_item.tpl +++ b/view/theme/smoothly/templates/search_item.tpl @@ -5,8 +5,8 @@
    -
    {{$item.name}} @@ -17,16 +17,16 @@
    -
    +
    {{if $item.location_html}}{{$item.location_html nofilter}} {{/if}}
    {{if $item.lock}}
    {{$item.lock}}
    - {{else}}
    {{/if}} + {{else}}
    {{/if}}
    - {{if $item.drop && $item.drop.dropping}}{{/if}} + {{if $item.drop && $item.drop.dropping}}{{/if}}
    {{if $item.drop && $item.drop.pagedrop}}{{/if}}
    @@ -39,9 +39,9 @@
    {{$item.name}}
    {{$item.ago}}
    - -
    - + +
    +
    diff --git a/view/theme/smoothly/templates/wall_thread.tpl b/view/theme/smoothly/templates/wall_thread.tpl index 53602cc8fc..594799f6b8 100644 --- a/view/theme/smoothly/templates/wall_thread.tpl +++ b/view/theme/smoothly/templates/wall_thread.tpl @@ -136,7 +136,7 @@
    {{if $item.drop && $item.drop.dropping}} - + {{/if}}
    diff --git a/view/theme/vier/templates/search_item.tpl b/view/theme/vier/templates/search_item.tpl index e556335a55..51de297d3a 100644 --- a/view/theme/vier/templates/search_item.tpl +++ b/view/theme/vier/templates/search_item.tpl @@ -80,7 +80,7 @@ {{/if}} {{if $item.drop && $item.drop.dropping}} - {{$item.drop.delete}} + {{$item.drop.label}} {{/if}} {{if $item.edpost}} diff --git a/view/theme/vier/templates/wall_item_tag.tpl b/view/theme/vier/templates/wall_item_tag.tpl index c12cb7085f..92cfaf914f 100644 --- a/view/theme/vier/templates/wall_item_tag.tpl +++ b/view/theme/vier/templates/wall_item_tag.tpl @@ -3,12 +3,12 @@ {{else}} {{if $item.comment_firstcollapsed}}
    - {{$item.num_comments}} - {{$item.hide_text}} - {{if $item.thread_level==3}} - + {{if $item.thread_level==3}} - expand / @@ -32,7 +32,7 @@ - +
    {{$item.location_html nofilter}}
    @@ -44,7 +44,7 @@ {{/if}} {{if $item.drop && $item.drop.dropping}} - {{$item.drop.delete}} + {{$item.drop.label}} {{/if}} -- 2.39.5