Created
March 11, 2010 05:56
-
-
Save tischler/328886 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -246,11 +246,14 @@ def set_subreddit(): | |
if '+' in sr_name: | |
srs = set() | |
sr_names = sr_name.split('+') | |
- real_path = sr_name | |
- for sr_name in sr_names: | |
- srs.add(Subreddit._by_name(sr_name)) | |
- sr_ids = [sr._id for sr in srs] | |
- c.site = MultiReddit(sr_ids, real_path) | |
+ if 'all' in sr_names: | |
+ c.site = Subreddit._by_name('all') | |
+ else: | |
+ real_path = sr_name | |
+ for sr_name in sr_names: | |
+ srs.add(Subreddit._by_name(sr_name)) | |
+ sr_ids = [sr._id for sr in srs] | |
+ c.site = MultiReddit(sr_ids, real_path) | |
else: | |
c.site = Subreddit._by_name(sr_name) | |
except NotFound: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment