posts: remove rating, note, and status locks.
Remove the ability for users to lock ratings, note, and post statuses. Historically the majority of locked posts were from 10+ years ago when certain users habitually locked ratings and notes on every post they touched for no reason. Nowadays most posts have been unlocked. Only a handful of locked posts are left, none of which deserve to be locked. The is_rating_locked, is_note_locked, and is_status_locked columns still exist in the database, but aren't used.
This commit is contained in:
@@ -162,8 +162,6 @@ class PostQueryBuilder
|
||||
child_matches(value)
|
||||
when "rating"
|
||||
Post.where(rating: value.first.downcase)
|
||||
when "locked"
|
||||
locked_matches(value)
|
||||
when "embedded"
|
||||
embedded_matches(value)
|
||||
when "source"
|
||||
@@ -470,19 +468,6 @@ class PostQueryBuilder
|
||||
end
|
||||
end
|
||||
|
||||
def locked_matches(query)
|
||||
case query.downcase
|
||||
when "rating"
|
||||
Post.where(is_rating_locked: true)
|
||||
when "note", "notes"
|
||||
Post.where(is_note_locked: true)
|
||||
when "status"
|
||||
Post.where(is_status_locked: true)
|
||||
else
|
||||
Post.none
|
||||
end
|
||||
end
|
||||
|
||||
def table_for_metatag(metatag)
|
||||
if metatag.in?(COUNT_METATAGS)
|
||||
metatag[/(?<table>[a-z]+)_count\z/i, :table]
|
||||
|
||||
Reference in New Issue
Block a user