app/models/wiki_page.rb
# FIXME: history shouldn't be changed on lock/unlock.
#        We should instead check last post status when editing
#        instead of doing mass update.
history shouldn't be changed on lock/unlock.
We should instead check last post status when editing
instead of doing mass update.
history shouldn ' t be changed on lock / unlock . We should instead check last post status when editing instead of doing mass update .
def lock!
    self.is_locked = true
    transaction do
      execute_sql("UPDATE wiki_pages SET is_locked = TRUE WHERE id = ?", id)
      execute_sql("UPDATE wiki_page_versions SET is_locked = TRUE WHERE wiki_page_id = ?", id)
    end
  end
def lock! self . is_locked = true transaction do execute_sql ( "UPDATE wiki_pages SET is_locked = TRUE WHERE id = ?" , id ) execute_sql ( "UPDATE wiki_page_versions SET is_locked = TRUE WHERE wiki_page_id = ?" , id ) end end
FIXME: history shouldn't be changed on lock/unlock.
FIXME : history shouldn ' t be changed on lock / unlock .