From bfa457c67f772b21c004d37035e8861ca0f3568a Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Fri, 21 Dec 2012 11:12:39 -0800 Subject: [PATCH] Fix bad ad URLs causing mistargeting. c.site.path = /r/whatever/ c.site.name = whatever "r/%s/" % c.site.name = "r//r/whatever//" --- r2/r2/lib/pages/pages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r2/r2/lib/pages/pages.py b/r2/r2/lib/pages/pages.py index d10a82fe7..421419aa3 100755 --- a/r2/r2/lib/pages/pages.py +++ b/r2/r2/lib/pages/pages.py @@ -2341,9 +2341,9 @@ class Ads(Templated): Templated.__init__(self) path = "" if c.custom_dart_keyword: - path = "r/%s/%s" % (c.site.path, c.custom_dart_keyword) + path = "r/%s/%s" % (c.site.name, c.custom_dart_keyword) elif not c.default_sr: - path = "r/%s/" % c.site.path + path = "r/%s/" % c.site.name self.ad_url = g.ad_domain + "/ads/" + path self.frame_id = "ad-frame"