File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515module ::DiscourseModifications
1616 PLUGIN_NAME = "discourse-modifications"
17+
18+ XF_TOPIC_LINK_NORMALIZATION = '/threads\/[^.]+\.([0-9]+)\/?/threads/\1'
1719end
1820
1921require_relative "lib/discourse_modifications/engine"
@@ -27,11 +29,10 @@ module ::DiscourseModifications
2729 Topic . slug_computed_callbacks << ::DiscourseModifications ::TopicSlug . method ( :slug_for_topic )
2830
2931 # add permalink normalization
30- XF_TOPIC_LINK_NORMALIZATION = '/threads\/[^.]+\.([0-9]+)\/?/threads/\1'
3132 normalizations = SiteSetting . permalink_normalizations
3233 normalizations = normalizations . blank? ? [ ] : normalizations . split ( "|" )
3334
34- normalizations << XF_TOPIC_LINK_NORMALIZATION if normalizations . exclude? ( XF_TOPIC_LINK_NORMALIZATION )
35+ normalizations << :: DiscourseModifications . XF_TOPIC_LINK_NORMALIZATION if normalizations . exclude? ( :: DiscourseModifications . XF_TOPIC_LINK_NORMALIZATION )
3536
3637 SiteSetting . permalink_normalizations = normalizations . join ( "|" )
3738
You can’t perform that action at this time.
0 commit comments