mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-27 15:58:06 -05:00
fix the rising page for /r/all and for multi-reddits
This commit is contained in:
@@ -64,4 +64,7 @@ def get_rising(sr):
|
||||
#get the sr_ids
|
||||
sr_ids = sr.rising_srs()
|
||||
rising = cache.get('rising') or ()
|
||||
return [p[0] for p in filter(lambda pair: pair[1] in sr_ids, rising)]
|
||||
if sr_ids:
|
||||
return [p[0] for p in filter(lambda pair: pair[1] in sr_ids, rising)]
|
||||
else:
|
||||
return [p[0] for p in rising]
|
||||
|
||||
@@ -523,6 +523,9 @@ class AllSR(FakeSubreddit):
|
||||
q._filter(queries.db_times[time])
|
||||
return q
|
||||
|
||||
def rising_srs(self):
|
||||
return None
|
||||
|
||||
|
||||
class DefaultSR(FakeSubreddit):
|
||||
#notice the space before reddit.com
|
||||
@@ -577,6 +580,10 @@ class MultiReddit(DefaultSR):
|
||||
def get_links(self, sort, time):
|
||||
return self.get_links_sr_ids(self.sr_ids, sort, time)
|
||||
|
||||
def rising_srs(self):
|
||||
return self.sr_ids
|
||||
|
||||
|
||||
class SubSR(FakeSubreddit):
|
||||
stylesheet = 'subreddit.css'
|
||||
#this will make the javascript not send an SR parameter
|
||||
|
||||
Reference in New Issue
Block a user