Skip to content
Permalink
Browse files

Hardcode a lock on the "monoidal categories" page due to spam.

  • Loading branch information...
adeel committed Sep 8, 2017
1 parent ea3a568 commit dde3aa9f429d6b24b89b8ce910e80b75f0dcd9b4
Showing with 9 additions and 0 deletions.
  1. +9 −0 app/controllers/wiki_controller.rb
@@ -259,6 +259,10 @@ def edit
redirect_home
elsif @page.locked?(Time.now) and not params['break_lock']
redirect_to :web => @web_name, :action => 'locked', :id => @page_name
elsif @page.id == 231
# hardcode a lock on the "monoidal categories" page due to spam
flash[:info] = "The page \"#{@page_name}\" is currently locked due to spam."
redirect_to :web => @web_name, :action => 'show', :id => @page_name
else
@page.lock(Time.now, @author)
end
@@ -351,6 +355,11 @@ def save
author_name = params['author'].purify.strip
author_name = 'Anonymous' if author_name =~ /^\s*$/

if @page.id == 231
# hardcode a lock on the "monoidal categories" page due to spam
flash[:info] = "The page \"#{@page_name}\" is currently locked due to spam."
redirect_to :web => @web_name, :action => 'show', :id => @page_name

begin
the_content = params['content'].purify
prev_content = ''

0 comments on commit dde3aa9

Please sign in to comment.
You can’t perform that action at this time.