mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 15:28:37 -05:00
Move sr discovery links to zookeeper
This change will allow us to change the links without doing a code push
This commit is contained in:
@@ -496,3 +496,5 @@ beaker.session_secret = somesecret
|
||||
[live_config]
|
||||
# make frontpage 100% dart
|
||||
frontpage_dart = false
|
||||
# spotlight links for subreddit discovery
|
||||
sr_discovery_links =
|
||||
|
||||
@@ -269,8 +269,8 @@ class HotController(FixListing, ListingController):
|
||||
|
||||
# If prefs allow it, mix in promoted links and sr discovery content
|
||||
if c.user.pref_show_sponsors or not c.user.gold:
|
||||
if hasattr(g, 'sr_discovery_links'):
|
||||
spotlight_links.extend(g.sr_discovery_links)
|
||||
if g.live_config['sr_discovery_links']:
|
||||
spotlight_links.extend(g.live_config['sr_discovery_links'])
|
||||
random.shuffle(spotlight_links)
|
||||
spotlight_keep_fn = lambda l: promote.is_promo(l) or organic.keep_fresh_links(l)
|
||||
num_links = len(spotlight_links)
|
||||
|
||||
@@ -53,7 +53,7 @@ def visible_promo(article):
|
||||
c.user._id == article.author_id)
|
||||
|
||||
# subreddit discovery links are visible even without a live campaign
|
||||
if article._fullname in getattr(g, 'sr_discovery_links', {}):
|
||||
if article._fullname in g.live_config['sr_discovery_links']:
|
||||
return True
|
||||
|
||||
# promos are visible only if comments are not disabled and the
|
||||
|
||||
@@ -162,7 +162,6 @@ class Globals(object):
|
||||
'allowed_pay_countries',
|
||||
'case_sensitive_domains',
|
||||
'reserved_subdomains',
|
||||
'sr_discovery_links'
|
||||
],
|
||||
|
||||
ConfigValue.choice: {
|
||||
@@ -181,6 +180,9 @@ class Globals(object):
|
||||
ConfigValue.bool: [
|
||||
'frontpage_dart',
|
||||
],
|
||||
ConfigValue.tuple: [
|
||||
'sr_discovery_links',
|
||||
],
|
||||
}
|
||||
|
||||
def __init__(self, global_conf, app_conf, paths, **extra):
|
||||
|
||||
Reference in New Issue
Block a user