mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 18:34:52 +08:00
13 lines
319 B
Ruby
13 lines
319 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module Jobs
|
||
|
class FixEncodedTopicSlugs < ::Jobs::Onceoff
|
||
|
def execute_onceoff(args)
|
||
|
return unless SiteSetting.slug_generation_method == "encoded"
|
||
|
|
||
|
#Make all slugs nil and let the app regenerate with proper encoded ones
|
||
|
Topic.update_all(slug: nil)
|
||
|
end
|
||
|
end
|
||
|
end
|