From 657ab84825472131918de4dcd70b0b5534b8e036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Wed, 1 Apr 2015 23:08:29 +0200 Subject: [PATCH] disable edit notifications when using the rebake rake task --- lib/tasks/posts.rake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/tasks/posts.rake b/lib/tasks/posts.rake index 082c9d23d..5f661e550 100644 --- a/lib/tasks/posts.rake +++ b/lib/tasks/posts.rake @@ -17,6 +17,9 @@ end def rebake_posts(opts = {}) puts "Rebaking post markdown for '#{RailsMultisite::ConnectionManagement.current_db}'" + disable_edit_notifications = SiteSetting.disable_edit_notifications + SiteSetting.disable_edit_notifications = true + total = Post.count rebaked = 0 @@ -25,6 +28,8 @@ def rebake_posts(opts = {}) print_status(rebaked += 1, total) end + SiteSetting.disable_edit_notifications = disable_edit_notifications + puts "", "#{rebaked} posts done!", "-" * 50 end