From 48c745fbbdeffd23637d268b8cf73979f913b1c1 Mon Sep 17 00:00:00 2001 From: Andy H3 Date: Wed, 20 Sep 2023 11:59:07 +0700 Subject: [PATCH 01/14] Update FAQ-admin.md --- doc/FAQ-admin.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/FAQ-admin.md b/doc/FAQ-admin.md index e5f4f2a9f3..993a6c89ef 100644 --- a/doc/FAQ-admin.md +++ b/doc/FAQ-admin.md @@ -42,7 +42,7 @@ The listed emails need to be separated by a comma like this: 'admin_email' => 'mail1@example.com,mail2@example.com', ``` - + ### The Database structure seems not to be updated. What can I do? Please have a look at the Admin panel under [DB updates](/admin/dbsync/) and follow the link to *check database structure*. @@ -52,4 +52,4 @@ You can manually execute the structure update from the CLI in the base directory bin/console dbstructure update -if there occur any errors, please contact the [support group](https://forum.friendi.ca/profile/helpers). +if there occur any errors, please contact the [Friendica Support group](https://forum.friendi.ca/profile/helpers) or discuss in the [Friendica Admins group](https://forum.friendi.ca/profile/admins). From 2f95ad77e68ca4644093486efbf15045e1606100 Mon Sep 17 00:00:00 2001 From: Andy H3 Date: Fri, 22 Sep 2023 08:54:26 +0700 Subject: [PATCH 02/14] Update FAQ-admin.md --- doc/de/FAQ-admin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/de/FAQ-admin.md b/doc/de/FAQ-admin.md index 2441a51304..5160aeb707 100644 --- a/doc/de/FAQ-admin.md +++ b/doc/de/FAQ-admin.md @@ -56,4 +56,4 @@ Starte dazu bitte vom Grundverzeichnis deiner Friendica Instanz folgendes Komman bin/console dbstructure update -sollten bei der Ausführung Fehler auftreten, kontaktiere bitte die [Support Gruppe](https://forum.friendi.ca/profile/helpers). +sollten bei der Ausführung Fehler auftreten, kontaktiere bitte die [Friendia Support](https://forum.friendi.ca/profile/helpers) Gruppe oder die [Friendica Admins](https://forum.friendi.ca/profile/admins) Gruppe. From 1f5b66838ddd56e9043fd9126ac811569f9a03e1 Mon Sep 17 00:00:00 2001 From: Andy H3 Date: Fri, 22 Sep 2023 10:31:09 +0700 Subject: [PATCH 03/14] Closing tag --- doc/de/FAQ-admin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/de/FAQ-admin.md b/doc/de/FAQ-admin.md index 5160aeb707..3b171afe51 100644 --- a/doc/de/FAQ-admin.md +++ b/doc/de/FAQ-admin.md @@ -45,7 +45,7 @@ Die aufgelisteten Adressen werden wie folgt durch Kommas voneinander getrennt: 'admin_email' => 'mail1@example.com,mail2@example.com', ``` - + ### Die Datenbank Struktur schein nicht aktuell zu sein. Was kann ich tun? Rufe bitte im Admin Panel den Punkt [DB Updates](/admin/dbsync/) auf und folge dem Link *Datenbank Struktur überprüfen*. From c822baa9c6a8af79f796e02f59dfdd6fa553587a Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 23 Sep 2023 17:51:03 -0400 Subject: [PATCH 04/14] Restore attendance icons in event posts - Co-authored by @mexon --- src/Model/Item.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 8972d3b75e..de8c2e6da6 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1078,7 +1078,10 @@ class Item } if ($item['origin']) { - if (Photo::setPermissionFromBody($item['body'], $item['uid'], $item['contact-id'], $item['allow_cid'], $item['allow_gid'], $item['deny_cid'], $item['deny_gid'])) { + if ( + Photo::setPermissionFromBody($item['body'], $item['uid'], $item['contact-id'], $item['allow_cid'], $item['allow_gid'], $item['deny_cid'], $item['deny_gid']) + && ($item['object-type'] != Activity\ObjectType::EVENT) + ) { $item['object-type'] = Activity\ObjectType::IMAGE; } From fc5e60e97b506f1f241eea50edc7bbc828c43b83 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 23 Sep 2023 15:31:47 -0400 Subject: [PATCH 05/14] [frio] Change "Ignore thread" icon to slashed bell - The slashed eye is better used for ignoring content, not notifications --- view/theme/frio/templates/search_item.tpl | 4 ++-- view/theme/frio/templates/wall_thread.tpl | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/view/theme/frio/templates/search_item.tpl b/view/theme/frio/templates/search_item.tpl index 2d130cab80..bdc2ca3840 100644 --- a/view/theme/frio/templates/search_item.tpl +++ b/view/theme/frio/templates/search_item.tpl @@ -240,10 +240,10 @@ {{if $item.ignore}}
  • - {{$item.ignore.do}} + {{$item.ignore.do}}
  • - {{$item.ignore.undo}} + {{$item.ignore.undo}}
  • {{/if}} diff --git a/view/theme/frio/templates/wall_thread.tpl b/view/theme/frio/templates/wall_thread.tpl index 16494e1c0c..00e738d9a0 100644 --- a/view/theme/frio/templates/wall_thread.tpl +++ b/view/theme/frio/templates/wall_thread.tpl @@ -381,10 +381,10 @@ as the value of $top_child_total (this is done at the end of this file) {{if $item.ignore}}
  • - {{$item.ignore.do}} + {{$item.ignore.do}}
  • - {{$item.ignore.undo}} + {{$item.ignore.undo}}
  • {{/if}} @@ -560,10 +560,10 @@ as the value of $top_child_total (this is done at the end of this file) {{if $item.ignore}}
  • - {{$item.ignore.do}} + {{$item.ignore.do}}
  • - {{$item.ignore.undo}} + {{$item.ignore.undo}}
  • {{/if}} From 3cc469c0b76114821836474e89ab06e8c1891404 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 23 Sep 2023 15:56:49 -0400 Subject: [PATCH 06/14] Rework image grid into a horizontal masonry - The new server-based horizontal masonry enables tightly packed image grids even with images of varying aspect ratios - Additionally, the space an image takes is now allocated before it's loaded, reducing content shifting --- src/Model/Item.php | 60 ++++++++++++++++++++++----- view/global.css | 27 ++++++------ view/templates/content/image.tpl | 4 +- view/templates/content/image_grid.tpl | 20 ++++----- 4 files changed, 77 insertions(+), 34 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index de8c2e6da6..8b0fa29a25 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3268,25 +3268,64 @@ class Item } /** + * Creates a horizontally masoned gallery with a fixed maximum number of pictures per row. + * + * For each row, we calculate how much of the total width each picture will take depending on their aspect ratio + * and how much relative height it needs to accomodate all pictures next to each other with their height normalized. + * * @param array $images * @return string * @throws \Friendica\Network\HTTPException\ServiceUnavailableException */ private static function makeImageGrid(array $images): string { - // Image for first column (fc) and second column (sc) - $images_fc = []; - $images_sc = []; + static $column_size = 2; - for ($i = 0; $i < count($images); $i++) { - ($i % 2 == 0) ? ($images_fc[] = $images[$i]) : ($images_sc[] = $images[$i]); - } + $rows = array_map( + function (array $row_images) { + if ($singleImageInRow = count($row_images) == 1) { + $row_images[] = $row_images[0]; + } + + $widths = []; + $heights = []; + foreach ($row_images as $image) { + $widths[] = $image['attachment']['width']; + $heights[] = $image['attachment']['height']; + } + + $maxHeight = max($heights); + + // Corrected height preserving aspect ratio when all images on a row are + $correctedWidths = []; + foreach ($widths as $i => $width) { + $correctedWidths[] = $width * $maxHeight / $heights[$i]; + } + + $totalWidth = array_sum($correctedWidths); + + foreach ($row_images as $i => $image) { + $row_images[$i]['gridWidth'] = $correctedWidths[$i]; + $row_images[$i]['gridHeight'] = $maxHeight; + $row_images[$i]['heightRatio'] = 100 * $maxHeight / $correctedWidths[$i]; + // Ratio of the width of the image relative to the total width of the images on the row + $row_images[$i]['widthRatio'] = 100 * $correctedWidths[$i] / $totalWidth; + // This magic value will stay constant for each image of any given row and + // is ultimately used to determine the height of the row container + $row_images[$i]['commonHeightRatio'] = 100 * $correctedWidths[$i] / $totalWidth / ($widths[$i] / $heights[$i]); + } + + if ($singleImageInRow) { + unset($row_images[1]); + } + + return $row_images; + }, + array_chunk($images, $column_size) + ); return Renderer::replaceMacros(Renderer::getMarkupTemplate('content/image_grid.tpl'), [ - 'columns' => [ - 'fc' => $images_fc, - 'sc' => $images_sc, - ], + 'rows' => $rows, ]); } @@ -3464,6 +3503,7 @@ class Item if (self::containsLink($item['body'], $src_url)) { continue; } + $images[] = ['src' => $src_url, 'preview' => $preview_url, 'attachment' => $attachment, 'uri_id' => $item['uri-id']]; } } diff --git a/view/global.css b/view/global.css index 714bb55dbd..054ac05159 100644 --- a/view/global.css +++ b/view/global.css @@ -685,22 +685,25 @@ audio { .imagegrid-row { display: -ms-flexbox; /* IE10 */ display: flex; - margin-top: 1em; + /* Both the following values should be the same to ensure consistent margins between images in the grid */ column-gap: 5px; + margin-top: 5px; } -.imagegrid-column { - -ms-flex: 50%; /* IE10 */ - flex: 50%; - display: -ms-flexbox; /* IE10 */ - display: flex; - flex-direction: column; - row-gap: 5px; +/* This helps allocating space for image before they loaded, preventing content shifting once they are + * Inspired by https://www.smashingmagazine.com/2016/08/ways-to-reduce-content-shifting-on-page-load/ + * Please note: The space is effectively allocated using padding-bottom using the image ratio as a value. + * In the image grid, this ratio isn't known in advance so no value is set in the stylesheet. + */ +.imagegrid-row figure { + position: relative; } - -.imagegrid-column img { - -ms-flex: 50%; /* IE10 */ - flex: 50%; +.imagegrid-row figure img{ + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; } /** * Image grid settings END diff --git a/view/templates/content/image.tpl b/view/templates/content/image.tpl index 00b1aac100..16610722cc 100644 --- a/view/templates/content/image.tpl +++ b/view/templates/content/image.tpl @@ -1,5 +1,7 @@ {{if $image.preview}} -{{$image.attachment.description}} + + {{$image.attachment.description}} + {{else}} {{$image.attachment.description}} {{/if}} diff --git a/view/templates/content/image_grid.tpl b/view/templates/content/image_grid.tpl index 95e49ee3e1..35e9324aec 100644 --- a/view/templates/content/image_grid.tpl +++ b/view/templates/content/image_grid.tpl @@ -1,12 +1,10 @@ -
    -
    - {{foreach $columns.fc as $img}} - {{include file="content/image.tpl" image=$img}} - {{/foreach}} +{{foreach $rows as $images}} +
    + {{foreach $images as $image}} + {{* The absolute pixel value in the calc() should be mirrored from the .imagegrid-row column-gap value *}} +
    + {{include file="content/image.tpl" image=$image}} +
    + {{/foreach}}
    -
    - {{foreach $columns.sc as $img}} - {{include file="content/image.tpl" image=$img}} - {{/foreach}} -
    -
    \ No newline at end of file +{{/foreach}} From fad760f46abb43d17271506f484dc8ccebfa05b4 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 23 Sep 2023 17:03:59 -0400 Subject: [PATCH 07/14] Add icon placeholder for images in image grid --- src/Model/Profile.php | 8 +++++--- src/Module/Photo.php | 2 +- view/global.css | 1 + view/theme/frio/scheme/black.css | 4 ++++ view/theme/frio/scheme/dark.css | 4 ++++ 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index b80c83881a..9c7aab54ad 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -813,12 +813,14 @@ class Profile /** * Set the visitor cookies (see remote_user()) for signed HTTP requests - ( + * + * @param array $server The content of the $_SERVER superglobal * @return array Visitor contact array + * @throws InternalServerErrorException */ - public static function addVisitorCookieForHTTPSigner(): array + public static function addVisitorCookieForHTTPSigner(array $server): array { - $requester = HTTPSignature::getSigner('', $_SERVER); + $requester = HTTPSignature::getSigner('', $server); if (empty($requester)) { return []; } diff --git a/src/Module/Photo.php b/src/Module/Photo.php index c8e0656d2d..be2408edf2 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -77,7 +77,7 @@ class Photo extends BaseApi throw new NotModifiedException(); } - Profile::addVisitorCookieForHTTPSigner(); + Profile::addVisitorCookieForHTTPSigner($this->server); $customsize = 0; $square_resize = true; diff --git a/view/global.css b/view/global.css index 054ac05159..6bee34b8bc 100644 --- a/view/global.css +++ b/view/global.css @@ -697,6 +697,7 @@ audio { */ .imagegrid-row figure { position: relative; + background: center / auto rgba(0, 0, 0, 0.05) url(/images/icons/image.png) no-repeat; } .imagegrid-row figure img{ position: absolute; diff --git a/view/theme/frio/scheme/black.css b/view/theme/frio/scheme/black.css index debf9d99b3..21a40f1c7c 100644 --- a/view/theme/frio/scheme/black.css +++ b/view/theme/frio/scheme/black.css @@ -394,3 +394,7 @@ input[type="text"].tt-input { textarea#profile-jot-text:focus + #preview_profile-jot-text, textarea.comment-edit-text:focus + .comment-edit-form .preview { border-color: $link_color; } + +.imagegrid-row figure { + background-color: rgba(255, 255, 255, 0.15); +} diff --git a/view/theme/frio/scheme/dark.css b/view/theme/frio/scheme/dark.css index add36fff10..29b2782da2 100644 --- a/view/theme/frio/scheme/dark.css +++ b/view/theme/frio/scheme/dark.css @@ -354,3 +354,7 @@ input[type="text"].tt-input { textarea#profile-jot-text:focus + #preview_profile-jot-text, textarea.comment-edit-text:focus + .comment-edit-form .preview { border-color: $link_color; } + +.imagegrid-row figure { + background-color: rgba(255, 255, 255, 0.05); +} From 86141eb363ff7f82fefab94a4ba671013534ef35 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 23 Sep 2023 22:20:00 -0400 Subject: [PATCH 08/14] Add height allocation to single post attached images - Force single images to expand to the total width of the post --- src/Model/Item.php | 10 +++++++++- view/global.css | 5 +++-- view/templates/content/image.tpl | 11 +++++++---- view/templates/content/image_grid.tpl | 4 +--- view/theme/frio/scheme/black.css | 2 +- view/theme/frio/scheme/dark.css | 2 +- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 8b0fa29a25..31cc0ac875 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3325,7 +3325,8 @@ class Item ); return Renderer::replaceMacros(Renderer::getMarkupTemplate('content/image_grid.tpl'), [ - 'rows' => $rows, + '$rows' => $rows, + '$column_size' => $column_size, ]); } @@ -3512,8 +3513,15 @@ class Item if (count($images) > 1) { $media = self::makeImageGrid($images); } elseif (count($images) == 1) { + if (!empty($images[0]['attachment']['preview-height'])) { + $allocated_height = (100 * $images[0]['attachment']['preview-height'] / $images[0]['attachment']['preview-width']) . '%'; + } else { + $allocated_height = (100 * $images[0]['attachment']['height'] / $images[0]['attachment']['width']) . '%'; + } + $media = Renderer::replaceMacros(Renderer::getMarkupTemplate('content/image.tpl'), [ '$image' => $images[0], + '$allocated_height' => $allocated_height, ]); } diff --git a/view/global.css b/view/global.css index 6bee34b8bc..247a9694f7 100644 --- a/view/global.css +++ b/view/global.css @@ -695,16 +695,17 @@ audio { * Please note: The space is effectively allocated using padding-bottom using the image ratio as a value. * In the image grid, this ratio isn't known in advance so no value is set in the stylesheet. */ -.imagegrid-row figure { +figure.img-allocated-height { position: relative; background: center / auto rgba(0, 0, 0, 0.05) url(/images/icons/image.png) no-repeat; } -.imagegrid-row figure img{ +figure.img-allocated-height img{ position: absolute; top: 0; right: 0; bottom: 0; left: 0; + width: 100%; } /** * Image grid settings END diff --git a/view/templates/content/image.tpl b/view/templates/content/image.tpl index 16610722cc..9cff3614a1 100644 --- a/view/templates/content/image.tpl +++ b/view/templates/content/image.tpl @@ -1,7 +1,10 @@ +{{* $image.widthRatio is only set in the context of Model\Item->makeImageGrid *}} +
    {{if $image.preview}} - - {{$image.attachment.description}} - + + {{$image.attachment.description}} + {{else}} -{{$image.attachment.description}} + {{$image.attachment.description}} {{/if}} +
    diff --git a/view/templates/content/image_grid.tpl b/view/templates/content/image_grid.tpl index 35e9324aec..b0d32d8e16 100644 --- a/view/templates/content/image_grid.tpl +++ b/view/templates/content/image_grid.tpl @@ -2,9 +2,7 @@
    {{foreach $images as $image}} {{* The absolute pixel value in the calc() should be mirrored from the .imagegrid-row column-gap value *}} -
    - {{include file="content/image.tpl" image=$image}} -
    + {{include file="content/image.tpl" image=$image allocated_height="calc(`$image.heightRatio * $image.widthRatio / 100`% - 5px / `$column_size`)"}} {{/foreach}}
    {{/foreach}} diff --git a/view/theme/frio/scheme/black.css b/view/theme/frio/scheme/black.css index 21a40f1c7c..561f708a81 100644 --- a/view/theme/frio/scheme/black.css +++ b/view/theme/frio/scheme/black.css @@ -395,6 +395,6 @@ textarea#profile-jot-text:focus + #preview_profile-jot-text, textarea.comment-ed border-color: $link_color; } -.imagegrid-row figure { +figure.img-allocated-height { background-color: rgba(255, 255, 255, 0.15); } diff --git a/view/theme/frio/scheme/dark.css b/view/theme/frio/scheme/dark.css index 29b2782da2..434681c558 100644 --- a/view/theme/frio/scheme/dark.css +++ b/view/theme/frio/scheme/dark.css @@ -355,6 +355,6 @@ textarea#profile-jot-text:focus + #preview_profile-jot-text, textarea.comment-ed border-color: $link_color; } -.imagegrid-row figure { +figure.img-allocated-height { background-color: rgba(255, 255, 255, 0.05); } From c4657c46619471cb667731a47fd0985e27d1d800 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 23 Sep 2023 22:43:31 -0400 Subject: [PATCH 09/14] Add support for allocated height for inline images --- src/Model/Item.php | 23 +++++++++++++++-------- src/Model/Post/Media.php | 17 +++++++++++++++++ 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 31cc0ac875..6eba41392b 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -33,6 +33,7 @@ use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Post\Category; +use Friendica\Model\Post\Media; use Friendica\Network\HTTPException\InternalServerErrorException; use Friendica\Protocol\Activity; use Friendica\Protocol\ActivityPub; @@ -3344,7 +3345,19 @@ class Item if (empty($attachment['preview']) || ($attachment['type'] != Post\Media::IMAGE)) { continue; } - $s = str_replace('(.*?)">#'; + + $s = preg_replace_callback($pattern, function () use ($attachment, $uri_id) { + return Renderer::replaceMacros(Renderer::getMarkupTemplate('content/image.tpl'), [ + '$image' => [ + 'src' => $attachment['url'], + 'uri_id' => $uri_id, + 'attachment' => $attachment, + ], + '$allocated_height' => Media::getAllocatedHeightByMedia($attachment), + ]); + }, $s); } return $s; } @@ -3513,15 +3526,9 @@ class Item if (count($images) > 1) { $media = self::makeImageGrid($images); } elseif (count($images) == 1) { - if (!empty($images[0]['attachment']['preview-height'])) { - $allocated_height = (100 * $images[0]['attachment']['preview-height'] / $images[0]['attachment']['preview-width']) . '%'; - } else { - $allocated_height = (100 * $images[0]['attachment']['height'] / $images[0]['attachment']['width']) . '%'; - } - $media = Renderer::replaceMacros(Renderer::getMarkupTemplate('content/image.tpl'), [ '$image' => $images[0], - '$allocated_height' => $allocated_height, + '$allocated_height' => Media::getAllocatedHeightByMedia($images[0]['attachment']), ]); } diff --git a/src/Model/Post/Media.php b/src/Model/Post/Media.php index a0d55b6e00..23370de3f4 100644 --- a/src/Model/Post/Media.php +++ b/src/Model/Post/Media.php @@ -1164,4 +1164,21 @@ class Media } return $url . $id; } + + /** + * Computes the allocated height value used in the content/image.tpl template based on a post-media record + * + * @param array $media A post-media record array + * @return string + */ + public static function getAllocatedHeightByMedia(array $media): string + { + if (!empty($media['preview-height'])) { + $allocated_height = (100 * $media['preview-height'] / $media['preview-width']) . '%'; + } else { + $allocated_height = (100 * $media['height'] / $media['width']) . '%'; + } + + return $allocated_height; + } } From 1dbc9bd472c1ed4048386f5d5c8ace5ef77af71b Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 24 Sep 2023 10:18:50 +0000 Subject: [PATCH 10/14] Avoid quoting the own post --- src/Content/Item.php | 6 +++--- src/Content/Text/Plaintext.php | 4 ++-- src/Model/Item.php | 7 ++++++- src/Model/Post/Media.php | 5 +++++ src/Model/Post/UserNotification.php | 2 +- src/Protocol/ActivityPub/Transmitter.php | 6 +++--- 6 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/Content/Item.php b/src/Content/Item.php index 163db89aa4..c94ec1299b 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -638,7 +638,7 @@ class Item $body = $item['body']; } - if (empty($item['quote-uri-id'])) { + if (empty($item['quote-uri-id']) || ($item['quote-uri-id'] == $item['uri-id'])) { return $body; } @@ -729,7 +729,7 @@ class Item */ public function getSharedPost(array $item, array $fields = []): array { - if (!empty($item['quote-uri-id'])) { + if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) { $shared = Post::selectFirst($fields, ['uri-id' => $item['quote-uri-id'], 'uid' => [0, $item['uid'] ?? 0]]); if (is_array($shared)) { return [ @@ -770,7 +770,7 @@ class Item return $attributes; } - if (!empty($item['quote-uri-id'])) { + if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) { $shared = Post::selectFirst(['author-name', 'author-link', 'author-avatar', 'plink', 'created', 'guid', 'uri', 'body'], ['uri-id' => $item['quote-uri-id']]); if (!empty($shared)) { return [ diff --git a/src/Content/Text/Plaintext.php b/src/Content/Text/Plaintext.php index 86d720a02a..3b531f01bc 100644 --- a/src/Content/Text/Plaintext.php +++ b/src/Content/Text/Plaintext.php @@ -324,7 +324,7 @@ class Plaintext $post['text'] = Post\Media::removeFromBody($post['text']); $images = Post\Media::getByURIId($item['uri-id'], [Post\Media::IMAGE]); - if (!empty($item['quote-uri-id'])) { + if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) { $images = array_merge($images, Post\Media::getByURIId($item['quote-uri-id'], [Post\Media::IMAGE])); } foreach ($images as $image) { @@ -355,7 +355,7 @@ class Plaintext // Look for audio or video links $media = Post\Media::getByURIId($item['uri-id'], [Post\Media::AUDIO, Post\Media::VIDEO]); - if (!empty($item['quote-uri-id'])) { + if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) { $media = array_merge($media, Post\Media::getByURIId($item['quote-uri-id'], [Post\Media::AUDIO, Post\Media::VIDEO])); } diff --git a/src/Model/Item.php b/src/Model/Item.php index de8c2e6da6..41aae04134 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1184,6 +1184,11 @@ class Item } } + if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] == $item['uri-id'])) { + Logger::info('Quote-Uri-Id is identical to Uri-Id', ['uri-id' => $item['uri-id'], 'guid' => $item['guid']]); + unset($item['quote-uri-id']); + } + if (!empty($item['quote-uri-id'])) { $item['raw-body'] = BBCode::removeSharedData($item['raw-body']); $item['body'] = BBCode::removeSharedData($item['body']); @@ -3125,7 +3130,7 @@ class Item $item['body'] = BBCode::removeSharedData($item['body']); } elseif (empty($shared_item['uri-id']) && empty($item['quote-uri-id']) && ($item['network'] != Protocol::DIASPORA)) { $media = Post\Media::getByURIId($item['uri-id'], [Post\Media::ACTIVITY]); - if (!empty($media)) { + if (!empty($media) && ($media[0]['media-uri-id'] != $item['uri-id'])) { $shared_item = Post::selectFirst($fields, ['uri-id' => $media[0]['media-uri-id'], 'uid' => [$item['uid'], 0]]); if (empty($shared_item['uri-id'])) { $shared_item = Post::selectFirst($fields, ['plink' => $media[0]['url'], 'uid' => [$item['uid'], 0]]); diff --git a/src/Model/Post/Media.php b/src/Model/Post/Media.php index a0d55b6e00..e0c8d3561f 100644 --- a/src/Model/Post/Media.php +++ b/src/Model/Post/Media.php @@ -265,6 +265,11 @@ class Media return $media; } + if ($item['uri-id'] == $media['uri-id']) { + Logger::info('Media-Uri-Id is identical to Uri-Id', ['uri-id' => $media['uri-id']]); + return $media; + } + if ( !empty($item['plink']) && Strings::compareLink($item['plink'], $media['url']) && parse_url($item['plink'], PHP_URL_HOST) != parse_url($item['uri'], PHP_URL_HOST) diff --git a/src/Model/Post/UserNotification.php b/src/Model/Post/UserNotification.php index 726e82d7e0..41c8b50312 100644 --- a/src/Model/Post/UserNotification.php +++ b/src/Model/Post/UserNotification.php @@ -602,7 +602,7 @@ class UserNotification */ private static function checkQuoted(array $item, array $contacts): bool { - if (empty($item['quote-uri-id'])) { + if (empty($item['quote-uri-id']) || ($item['quote-uri-id'] == $item['uri-id'])) { return false; } $condition = ['uri-id' => $item['quote-uri-id'], 'uid' => $item['uid'], 'author-id' => $contacts, 'deleted' => false, 'gravity' => [item::GRAVITY_PARENT, Item::GRAVITY_COMMENT]]; diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 4b0450a0cd..72a9c929fa 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -1752,7 +1752,7 @@ class Transmitter $body = BBCode::setMentionsToNicknames($body); - if (!empty($item['quote-uri-id'])) { + if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) { if (Post::exists(['uri-id' => $item['quote-uri-id'], 'network' => [Protocol::ACTIVITYPUB, Protocol::DFRN]])) { $real_quote = true; $data['quoteUrl'] = $item['quote-uri']; @@ -1772,7 +1772,7 @@ class Transmitter if (!empty($language)) { $richbody = BBCode::setMentionsToNicknames($item['body'] ?? ''); $richbody = Post\Media::removeFromEndOfBody($richbody); - if (!empty($item['quote-uri-id'])) { + if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) { if ($real_quote) { $richbody = DI::contentItem()->addShareLink($richbody, $item['quote-uri-id']); } else { @@ -1784,7 +1784,7 @@ class Transmitter $data['contentMap'][$language] = BBCode::convertForUriId($item['uri-id'], $richbody, BBCode::EXTERNAL); } - if (!empty($item['quote-uri-id'])) { + if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) { $source = DI::contentItem()->addSharedPost($item, $item['body']); } else { $source = $item['body']; From 06818a96c30b2000bc4896b65d8fb87284260ae5 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 24 Sep 2023 06:47:18 -0400 Subject: [PATCH 11/14] Add height allocation support for single images smaller than the available width --- src/Model/Item.php | 4 ++++ src/Model/Post/Media.php | 8 +------- view/templates/content/image.tpl | 14 ++++++++++++-- view/templates/content/image_grid.tpl | 6 +++++- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 6eba41392b..cd6b8a96fb 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3356,6 +3356,7 @@ class Item 'attachment' => $attachment, ], '$allocated_height' => Media::getAllocatedHeightByMedia($attachment), + '$allocated_max_width' => ($attachment['preview-width'] ?? $attachment['width']) . 'px', ]); }, $s); } @@ -3472,8 +3473,10 @@ class Item if ($attachment['filetype'] == 'image') { $preview_url = Post\Media::getPreviewUrlForId($attachment['id'], ($attachment['width'] > $attachment['height']) ? Proxy::SIZE_MEDIUM : Proxy::SIZE_LARGE); + $attachment['preview-width'] = ($attachment['width'] > $attachment['height']) ? Proxy::PIXEL_MEDIUM : Proxy::PIXEL_LARGE; } elseif (!empty($attachment['preview'])) { $preview_url = Post\Media::getPreviewUrlForId($attachment['id'], Proxy::SIZE_LARGE); + $attachment['preview-width'] = Proxy::PIXEL_LARGE; } else { $preview_url = ''; } @@ -3529,6 +3532,7 @@ class Item $media = Renderer::replaceMacros(Renderer::getMarkupTemplate('content/image.tpl'), [ '$image' => $images[0], '$allocated_height' => Media::getAllocatedHeightByMedia($images[0]['attachment']), + '$allocated_max_width' => ($images[0]['attachment']['preview-width'] ?? $images[0]['attachment']['width']) . 'px', ]); } diff --git a/src/Model/Post/Media.php b/src/Model/Post/Media.php index 23370de3f4..6987472fd4 100644 --- a/src/Model/Post/Media.php +++ b/src/Model/Post/Media.php @@ -1173,12 +1173,6 @@ class Media */ public static function getAllocatedHeightByMedia(array $media): string { - if (!empty($media['preview-height'])) { - $allocated_height = (100 * $media['preview-height'] / $media['preview-width']) . '%'; - } else { - $allocated_height = (100 * $media['height'] / $media['width']) . '%'; - } - - return $allocated_height; + return (100 * $media['height'] / $media['width']) . '%'; } } diff --git a/view/templates/content/image.tpl b/view/templates/content/image.tpl index 9cff3614a1..f32d611ef4 100644 --- a/view/templates/content/image.tpl +++ b/view/templates/content/image.tpl @@ -1,5 +1,11 @@ -{{* $image.widthRatio is only set in the context of Model\Item->makeImageGrid *}} -
    +{{* The padding-top height allocation trick only works if the
    fills its parent's width completely or with flex. 🤷‍♂️ + As a result, we need to add a wrapping element for non-flex (non-image grid) environments, mostly single-image cases. + *}} +{{if $allocated_max_width}} + +{{/if}} diff --git a/view/templates/content/image_grid.tpl b/view/templates/content/image_grid.tpl index b0d32d8e16..baf0dfd1d9 100644 --- a/view/templates/content/image_grid.tpl +++ b/view/templates/content/image_grid.tpl @@ -2,7 +2,11 @@
    {{foreach $images as $image}} {{* The absolute pixel value in the calc() should be mirrored from the .imagegrid-row column-gap value *}} - {{include file="content/image.tpl" image=$image allocated_height="calc(`$image.heightRatio * $image.widthRatio / 100`% - 5px / `$column_size`)"}} + {{include file="content/image.tpl" + image=$image + allocated_height="calc(`$image.heightRatio * $image.widthRatio / 100`% - 5px / `$column_size`)" + allocated_width="`$image.widthRatio`%" + }} {{/foreach}}
    {{/foreach}} From d081f8e80c1cbf83d29ab8db074ed56b82a34d3e Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 24 Sep 2023 06:47:30 -0400 Subject: [PATCH 12/14] Add height allocation support for vier --- view/global.css | 1 + 1 file changed, 1 insertion(+) diff --git a/view/global.css b/view/global.css index 247a9694f7..25fe653b78 100644 --- a/view/global.css +++ b/view/global.css @@ -698,6 +698,7 @@ audio { figure.img-allocated-height { position: relative; background: center / auto rgba(0, 0, 0, 0.05) url(/images/icons/image.png) no-repeat; + margin: 0; } figure.img-allocated-height img{ position: absolute; From 56fb9be0f77147541e8f3a98026ff6a7e7951107 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 24 Sep 2023 16:24:28 -0400 Subject: [PATCH 13/14] Revert "Merge pull request #13463 from MrPetovan/task/imagegrid-improvement" This reverts commit dd7bea4bd146acf52086d303fce34a83d52f2516, reversing changes made to ce16cd12ec4646413581f5ade6487387f56723e3. --- src/Model/Item.php | 81 +++-------------------- src/Model/Post/Media.php | 11 --- src/Model/Profile.php | 8 +-- src/Module/Photo.php | 2 +- view/global.css | 30 ++++----- view/templates/content/image.tpl | 19 +----- view/templates/content/image_grid.tpl | 22 +++--- view/theme/frio/scheme/black.css | 4 -- view/theme/frio/scheme/dark.css | 4 -- view/theme/frio/templates/search_item.tpl | 4 +- view/theme/frio/templates/wall_thread.tpl | 8 +-- 11 files changed, 46 insertions(+), 147 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 5d2f7ca3c8..41aae04134 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -33,7 +33,6 @@ use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Post\Category; -use Friendica\Model\Post\Media; use Friendica\Network\HTTPException\InternalServerErrorException; use Friendica\Protocol\Activity; use Friendica\Protocol\ActivityPub; @@ -3274,65 +3273,25 @@ class Item } /** - * Creates a horizontally masoned gallery with a fixed maximum number of pictures per row. - * - * For each row, we calculate how much of the total width each picture will take depending on their aspect ratio - * and how much relative height it needs to accomodate all pictures next to each other with their height normalized. - * * @param array $images * @return string * @throws \Friendica\Network\HTTPException\ServiceUnavailableException */ private static function makeImageGrid(array $images): string { - static $column_size = 2; + // Image for first column (fc) and second column (sc) + $images_fc = []; + $images_sc = []; - $rows = array_map( - function (array $row_images) { - if ($singleImageInRow = count($row_images) == 1) { - $row_images[] = $row_images[0]; - } - - $widths = []; - $heights = []; - foreach ($row_images as $image) { - $widths[] = $image['attachment']['width']; - $heights[] = $image['attachment']['height']; - } - - $maxHeight = max($heights); - - // Corrected height preserving aspect ratio when all images on a row are - $correctedWidths = []; - foreach ($widths as $i => $width) { - $correctedWidths[] = $width * $maxHeight / $heights[$i]; - } - - $totalWidth = array_sum($correctedWidths); - - foreach ($row_images as $i => $image) { - $row_images[$i]['gridWidth'] = $correctedWidths[$i]; - $row_images[$i]['gridHeight'] = $maxHeight; - $row_images[$i]['heightRatio'] = 100 * $maxHeight / $correctedWidths[$i]; - // Ratio of the width of the image relative to the total width of the images on the row - $row_images[$i]['widthRatio'] = 100 * $correctedWidths[$i] / $totalWidth; - // This magic value will stay constant for each image of any given row and - // is ultimately used to determine the height of the row container - $row_images[$i]['commonHeightRatio'] = 100 * $correctedWidths[$i] / $totalWidth / ($widths[$i] / $heights[$i]); - } - - if ($singleImageInRow) { - unset($row_images[1]); - } - - return $row_images; - }, - array_chunk($images, $column_size) - ); + for ($i = 0; $i < count($images); $i++) { + ($i % 2 == 0) ? ($images_fc[] = $images[$i]) : ($images_sc[] = $images[$i]); + } return Renderer::replaceMacros(Renderer::getMarkupTemplate('content/image_grid.tpl'), [ - '$rows' => $rows, - '$column_size' => $column_size, + 'columns' => [ + 'fc' => $images_fc, + 'sc' => $images_sc, + ], ]); } @@ -3350,20 +3309,7 @@ class Item if (empty($attachment['preview']) || ($attachment['type'] != Post\Media::IMAGE)) { continue; } - - $pattern = '#
    (.*?)">#'; - - $s = preg_replace_callback($pattern, function () use ($attachment, $uri_id) { - return Renderer::replaceMacros(Renderer::getMarkupTemplate('content/image.tpl'), [ - '$image' => [ - 'src' => $attachment['url'], - 'uri_id' => $uri_id, - 'attachment' => $attachment, - ], - '$allocated_height' => Media::getAllocatedHeightByMedia($attachment), - '$allocated_max_width' => ($attachment['preview-width'] ?? $attachment['width']) . 'px', - ]); - }, $s); + $s = str_replace(' $attachment['height']) ? Proxy::SIZE_MEDIUM : Proxy::SIZE_LARGE); - $attachment['preview-width'] = ($attachment['width'] > $attachment['height']) ? Proxy::PIXEL_MEDIUM : Proxy::PIXEL_LARGE; } elseif (!empty($attachment['preview'])) { $preview_url = Post\Media::getPreviewUrlForId($attachment['id'], Proxy::SIZE_LARGE); - $attachment['preview-width'] = Proxy::PIXEL_LARGE; } else { $preview_url = ''; } @@ -3525,7 +3469,6 @@ class Item if (self::containsLink($item['body'], $src_url)) { continue; } - $images[] = ['src' => $src_url, 'preview' => $preview_url, 'attachment' => $attachment, 'uri_id' => $item['uri-id']]; } } @@ -3536,8 +3479,6 @@ class Item } elseif (count($images) == 1) { $media = Renderer::replaceMacros(Renderer::getMarkupTemplate('content/image.tpl'), [ '$image' => $images[0], - '$allocated_height' => Media::getAllocatedHeightByMedia($images[0]['attachment']), - '$allocated_max_width' => ($images[0]['attachment']['preview-width'] ?? $images[0]['attachment']['width']) . 'px', ]); } diff --git a/src/Model/Post/Media.php b/src/Model/Post/Media.php index 8a2c731a2f..e0c8d3561f 100644 --- a/src/Model/Post/Media.php +++ b/src/Model/Post/Media.php @@ -1169,15 +1169,4 @@ class Media } return $url . $id; } - - /** - * Computes the allocated height value used in the content/image.tpl template based on a post-media record - * - * @param array $media A post-media record array - * @return string - */ - public static function getAllocatedHeightByMedia(array $media): string - { - return (100 * $media['height'] / $media['width']) . '%'; - } } diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 9c7aab54ad..b80c83881a 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -813,14 +813,12 @@ class Profile /** * Set the visitor cookies (see remote_user()) for signed HTTP requests - * - * @param array $server The content of the $_SERVER superglobal + ( * @return array Visitor contact array - * @throws InternalServerErrorException */ - public static function addVisitorCookieForHTTPSigner(array $server): array + public static function addVisitorCookieForHTTPSigner(): array { - $requester = HTTPSignature::getSigner('', $server); + $requester = HTTPSignature::getSigner('', $_SERVER); if (empty($requester)) { return []; } diff --git a/src/Module/Photo.php b/src/Module/Photo.php index be2408edf2..c8e0656d2d 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -77,7 +77,7 @@ class Photo extends BaseApi throw new NotModifiedException(); } - Profile::addVisitorCookieForHTTPSigner($this->server); + Profile::addVisitorCookieForHTTPSigner(); $customsize = 0; $square_resize = true; diff --git a/view/global.css b/view/global.css index 25fe653b78..714bb55dbd 100644 --- a/view/global.css +++ b/view/global.css @@ -685,28 +685,22 @@ audio { .imagegrid-row { display: -ms-flexbox; /* IE10 */ display: flex; - /* Both the following values should be the same to ensure consistent margins between images in the grid */ + margin-top: 1em; column-gap: 5px; - margin-top: 5px; } -/* This helps allocating space for image before they loaded, preventing content shifting once they are - * Inspired by https://www.smashingmagazine.com/2016/08/ways-to-reduce-content-shifting-on-page-load/ - * Please note: The space is effectively allocated using padding-bottom using the image ratio as a value. - * In the image grid, this ratio isn't known in advance so no value is set in the stylesheet. - */ -figure.img-allocated-height { - position: relative; - background: center / auto rgba(0, 0, 0, 0.05) url(/images/icons/image.png) no-repeat; - margin: 0; +.imagegrid-column { + -ms-flex: 50%; /* IE10 */ + flex: 50%; + display: -ms-flexbox; /* IE10 */ + display: flex; + flex-direction: column; + row-gap: 5px; } -figure.img-allocated-height img{ - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - width: 100%; + +.imagegrid-column img { + -ms-flex: 50%; /* IE10 */ + flex: 50%; } /** * Image grid settings END diff --git a/view/templates/content/image.tpl b/view/templates/content/image.tpl index f32d611ef4..00b1aac100 100644 --- a/view/templates/content/image.tpl +++ b/view/templates/content/image.tpl @@ -1,20 +1,5 @@ -{{* The padding-top height allocation trick only works if the
    fills its parent's width completely or with flex. 🤷‍♂️ - As a result, we need to add a wrapping element for non-flex (non-image grid) environments, mostly single-image cases. - *}} -{{if $allocated_max_width}} -
    -{{/if}} - -
    {{if $image.preview}} - - {{$image.attachment.description}} - +{{$image.attachment.description}} {{else}} - {{$image.attachment.description}} -{{/if}} -
    - -{{if $allocated_max_width}} -
    +{{$image.attachment.description}} {{/if}} diff --git a/view/templates/content/image_grid.tpl b/view/templates/content/image_grid.tpl index baf0dfd1d9..95e49ee3e1 100644 --- a/view/templates/content/image_grid.tpl +++ b/view/templates/content/image_grid.tpl @@ -1,12 +1,12 @@ -{{foreach $rows as $images}} -
    - {{foreach $images as $image}} - {{* The absolute pixel value in the calc() should be mirrored from the .imagegrid-row column-gap value *}} - {{include file="content/image.tpl" - image=$image - allocated_height="calc(`$image.heightRatio * $image.widthRatio / 100`% - 5px / `$column_size`)" - allocated_width="`$image.widthRatio`%" - }} - {{/foreach}} +
    +
    + {{foreach $columns.fc as $img}} + {{include file="content/image.tpl" image=$img}} + {{/foreach}}
    -{{/foreach}} +
    + {{foreach $columns.sc as $img}} + {{include file="content/image.tpl" image=$img}} + {{/foreach}} +
    +
    \ No newline at end of file diff --git a/view/theme/frio/scheme/black.css b/view/theme/frio/scheme/black.css index 561f708a81..debf9d99b3 100644 --- a/view/theme/frio/scheme/black.css +++ b/view/theme/frio/scheme/black.css @@ -394,7 +394,3 @@ input[type="text"].tt-input { textarea#profile-jot-text:focus + #preview_profile-jot-text, textarea.comment-edit-text:focus + .comment-edit-form .preview { border-color: $link_color; } - -figure.img-allocated-height { - background-color: rgba(255, 255, 255, 0.15); -} diff --git a/view/theme/frio/scheme/dark.css b/view/theme/frio/scheme/dark.css index 434681c558..add36fff10 100644 --- a/view/theme/frio/scheme/dark.css +++ b/view/theme/frio/scheme/dark.css @@ -354,7 +354,3 @@ input[type="text"].tt-input { textarea#profile-jot-text:focus + #preview_profile-jot-text, textarea.comment-edit-text:focus + .comment-edit-form .preview { border-color: $link_color; } - -figure.img-allocated-height { - background-color: rgba(255, 255, 255, 0.05); -} diff --git a/view/theme/frio/templates/search_item.tpl b/view/theme/frio/templates/search_item.tpl index bdc2ca3840..2d130cab80 100644 --- a/view/theme/frio/templates/search_item.tpl +++ b/view/theme/frio/templates/search_item.tpl @@ -240,10 +240,10 @@ {{if $item.ignore}}
  • - {{$item.ignore.do}} + {{$item.ignore.do}}
  • - {{$item.ignore.undo}} + {{$item.ignore.undo}}
  • {{/if}} diff --git a/view/theme/frio/templates/wall_thread.tpl b/view/theme/frio/templates/wall_thread.tpl index 00e738d9a0..16494e1c0c 100644 --- a/view/theme/frio/templates/wall_thread.tpl +++ b/view/theme/frio/templates/wall_thread.tpl @@ -381,10 +381,10 @@ as the value of $top_child_total (this is done at the end of this file) {{if $item.ignore}}
  • - {{$item.ignore.do}} + {{$item.ignore.do}}
  • - {{$item.ignore.undo}} + {{$item.ignore.undo}}
  • {{/if}} @@ -560,10 +560,10 @@ as the value of $top_child_total (this is done at the end of this file) {{if $item.ignore}}
  • - {{$item.ignore.do}} + {{$item.ignore.do}}
  • - {{$item.ignore.undo}} + {{$item.ignore.undo}}
  • {{/if}} From ea4c597ac421500b9f0571caa40e6fc3a12e99d9 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 23 Sep 2023 15:31:47 -0400 Subject: [PATCH 14/14] [frio] Change "Ignore thread" icon to slashed bell - The slashed eye is better used for ignoring content, not notifications --- view/theme/frio/templates/search_item.tpl | 4 ++-- view/theme/frio/templates/wall_thread.tpl | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/view/theme/frio/templates/search_item.tpl b/view/theme/frio/templates/search_item.tpl index 2d130cab80..bdc2ca3840 100644 --- a/view/theme/frio/templates/search_item.tpl +++ b/view/theme/frio/templates/search_item.tpl @@ -240,10 +240,10 @@ {{if $item.ignore}}
  • - {{$item.ignore.do}} + {{$item.ignore.do}}
  • - {{$item.ignore.undo}} + {{$item.ignore.undo}}
  • {{/if}} diff --git a/view/theme/frio/templates/wall_thread.tpl b/view/theme/frio/templates/wall_thread.tpl index 16494e1c0c..00e738d9a0 100644 --- a/view/theme/frio/templates/wall_thread.tpl +++ b/view/theme/frio/templates/wall_thread.tpl @@ -381,10 +381,10 @@ as the value of $top_child_total (this is done at the end of this file) {{if $item.ignore}}
  • - {{$item.ignore.do}} + {{$item.ignore.do}}
  • - {{$item.ignore.undo}} + {{$item.ignore.undo}}
  • {{/if}} @@ -560,10 +560,10 @@ as the value of $top_child_total (this is done at the end of this file) {{if $item.ignore}}
  • - {{$item.ignore.do}} + {{$item.ignore.do}}
  • - {{$item.ignore.undo}} + {{$item.ignore.undo}}
  • {{/if}}