mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 16:28:01 -05:00
Combine multi traffic into one name until stats system is smarter.
This commit is contained in:
@@ -128,7 +128,7 @@ def _decrypt(encrypted, secret):
|
||||
|
||||
def get_site():
|
||||
"""Return the name of the current "site" (subreddit)."""
|
||||
return c.site.name if c.site else ""
|
||||
return c.site.analytics_name if c.site else ""
|
||||
|
||||
|
||||
def get_srpath():
|
||||
|
||||
@@ -85,6 +85,10 @@ class BaseSite(object):
|
||||
def path(self):
|
||||
return "/r/%s/" % self.name
|
||||
|
||||
@property
|
||||
def analytics_name(self):
|
||||
return self.name
|
||||
|
||||
def is_moderator_with_perms(self, user, *perms):
|
||||
rel = self.is_moderator(user)
|
||||
if rel:
|
||||
@@ -1364,6 +1368,12 @@ class LabeledMulti(MultiReddit, tdb_cassandra.Thing):
|
||||
def name(self):
|
||||
return self.path.split('/')[-1]
|
||||
|
||||
@property
|
||||
def analytics_name(self):
|
||||
# classify as "multi" (as for unnamed multis) until our traffic system
|
||||
# is smarter
|
||||
return 'multi'
|
||||
|
||||
def can_view(self, user):
|
||||
return user == self.owner or self.visibility == 'public'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user