Don't track links within discourse unless they're to other topics.

This commit is contained in:
Robin Ward
2013-02-11 11:11:48 -05:00
parent 37fa61ab51
commit f21609fe2e
2 changed files with 101 additions and 95 deletions
+3
View File
@@ -49,6 +49,9 @@ class TopicLink < ActiveRecord::Base
route = Rails.application.routes.recognize_path(parsed.path)
topic_id = route[:topic_id]
post_number = route[:post_number] || 1
# We aren't interested in tracking internal links to non-topics
next unless topic_id
end
# Skip linking to ourselves