From ba72f6aec8836906416fc79e6402433bd2388ca1 Mon Sep 17 00:00:00 2001 From: Max Goodman Date: Fri, 8 Mar 2013 02:52:08 -0800 Subject: [PATCH] Add back id alias to sponsored link listing container. This fixes having two elements with the id "siteTable" on subreddit pages containing a single sponsored link. Thanks for the heads-up, /u/honestbleeps! --- r2/r2/controllers/listingcontroller.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r2/r2/controllers/listingcontroller.py b/r2/r2/controllers/listingcontroller.py index d248e3bbb..a2dfe549d 100755 --- a/r2/r2/controllers/listingcontroller.py +++ b/r2/r2/controllers/listingcontroller.py @@ -239,6 +239,7 @@ class HotController(FixListing, ListingController): res = wrap_links([link._fullname], wrapper=self.builder_wrapper, skip=False) + res.parent_name = "promoted" if res.things: return res @@ -247,6 +248,7 @@ class HotController(FixListing, ListingController): b = CampaignBuilder(promo_tuples, wrap=self.builder_wrapper, keep_fn=organic.keep_fresh_links, num=1, skip=True) res = LinkListing(b, nextprev=False).listing() + res.parent_name = "promoted" if res.things: return res