From 610728a70fabf42ad06b0d4109c6081c467177cd Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 14 Jul 2017 16:37:41 -0400 Subject: [PATCH] FIX: Don't include images in the topic map top links --- app/models/topic_link.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/topic_link.rb b/app/models/topic_link.rb index 12ae7dcaab0..0669f786765 100644 --- a/app/models/topic_link.rb +++ b/app/models/topic_link.rb @@ -57,6 +57,7 @@ SQL builder.where('ftl.topic_id = :topic_id', topic_id: topic_id) builder.where('ft.deleted_at IS NULL') + builder.where("NOT(ftl.url LIKE '%.png' OR ftl.url LIKE '%.jpg' OR ftl.url LIKE '%.gif')") builder.where("COALESCE(ft.archetype, 'regular') <> :archetype", archetype: Archetype.private_message) builder.secure_category(guardian.secure_category_ids)