Skip to content
This repository

Make /r/mod/comments work correctly (currently just shows /r/all/comments) #399

Closed
wants to merge 1 commit into from

3 participants

Chad Birch Keith Mitchell Neil Williams
Chad Birch
Owner

No description provided.

Keith Mitchell
Collaborator

"MultiRedditBase" would be appropriate to me.

Neil Williams
Owner

Agreed with @kemitche

Neil Williams
Owner

Closing because this was implemented (by making ModContribSR extend MultiReddit) in 91b7856.

Neil Williams spladug closed this November 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 31, 2012
Chad Birch Make /r/mod/comments work correctly instead of being the same as /r/a…
…ll/comments.
67ba9a8
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  r2/r2/models/subreddit.py
6  r2/r2/models/subreddit.py
@@ -935,6 +935,12 @@ def sr_ids(self):
935 935
 
936 936
     def get_links(self, sort, time):
937 937
         return self.get_links_sr_ids(self.sr_ids, sort, time)
  938
+        
  939
+    def get_all_comments(self):
  940
+        from r2.lib.db.queries import get_sr_comments, merge_results
  941
+        srs = Subreddit._byID(self.sr_ids, return_dict=False)
  942
+        results = [get_sr_comments(sr) for sr in srs]
  943
+        return merge_results(*results)
938 944
 
939 945
 class ModSR(ModContribSR):
940 946
     name  = "communities you moderate"
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.