mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-27 15:58:06 -05:00
Added a "reported" queue for subreddit moderators
This commit is contained in:
@@ -368,6 +368,22 @@ class FrontController(RedditController):
|
||||
stylesheet_contents = ''
|
||||
pane = SubredditStylesheet(site = c.site,
|
||||
stylesheet_contents = stylesheet_contents)
|
||||
elif is_moderator and location == 'reports':
|
||||
links = Link._query(Link.c.reported != 0,
|
||||
Link.c._spam == False)
|
||||
comments = Comment._query(Comment.c.reported != 0,
|
||||
Comment.c._spam == False)
|
||||
query = thing.Merge((links, comments),
|
||||
sort = desc('_date'),
|
||||
data = True,
|
||||
*c.site.query_rules())
|
||||
|
||||
builder = QueryBuilder(query, num = num, after = after,
|
||||
count = count, reverse = reverse,
|
||||
wrap = ListingController.builder_wrapper)
|
||||
listing = LinkListing(builder)
|
||||
pane = listing.listing()
|
||||
|
||||
elif is_moderator and location == 'spam':
|
||||
links = Link._query(Link.c._spam == True)
|
||||
comments = Comment._query(Comment.c._spam == True)
|
||||
|
||||
@@ -257,7 +257,8 @@ class SubredditInfoBar(Wrapped):
|
||||
if c.site.type != 'public':
|
||||
buttons.append(NavButton(plurals.contributors, 'contributors'))
|
||||
buttons.extend([NavButton(menu.banusers, 'banned'),
|
||||
NamedButton('spam')])
|
||||
NamedButton('spam'),
|
||||
NamedButton('reports')])
|
||||
return [NavMenu(buttons, type = "flatlist", base_path = "/about/")]
|
||||
|
||||
class SideBox(Wrapped):
|
||||
|
||||
@@ -766,3 +766,4 @@ def title_to_url(title, max_length = 50):
|
||||
if (last_word > 0):
|
||||
title = title[:last_word]
|
||||
return title
|
||||
|
||||
|
||||
Reference in New Issue
Block a user