diff --git a/r2/r2/controllers/promotecontroller.py b/r2/r2/controllers/promotecontroller.py index ee2296ecd..13bfbbcd0 100644 --- a/r2/r2/controllers/promotecontroller.py +++ b/r2/r2/controllers/promotecontroller.py @@ -771,13 +771,13 @@ class PromoteController(ListingController): start = start or end - timedelta(days=7) if link_text is not None: - names = link_text.replace(',', ' ').split() + id36s = link_text.replace(',', ' ').split() try: - links = Link._by_fullname(names, data=True) + links = Link._byID36(id36s, data=True) except NotFound: links = {} - bad_links = [name for name in names if name not in links] + bad_links = [id36 for id36 in id36s if id36 not in links] links = links.values() else: links = [] diff --git a/r2/r2/lib/pages/pages.py b/r2/r2/lib/pages/pages.py index 62fbb14a0..d327133c3 100755 --- a/r2/r2/lib/pages/pages.py +++ b/r2/r2/lib/pages/pages.py @@ -3806,22 +3806,22 @@ class PromoteReport(Templated): writer.writerow([]) writer.writerow((_("links"),)) writer.writerow(( - _("name"), + _("id"), _("owner"), _("comments"), _("upvotes"), _("downvotes"), )) for row in self.link_report: - writer.writerow((row['name'], row['owner'], row['comments'], + writer.writerow((row['id36'], row['owner'], row['comments'], row['upvotes'], row['downvotes'])) writer.writerow([]) writer.writerow((_("campaigns"),)) writer.writerow(( - _("link"), + _("link id"), _("owner"), - _("campaign"), + _("campaign id"), _("target"), _("bid"), _("frontpage clicks"), _("frontpage impressions"), @@ -3844,7 +3844,7 @@ class PromoteReport(Templated): for link in self.links: row = { - 'name': link._fullname, + 'id36': link._id36, 'owner': owners[link.author_id].name, 'comments': link.num_comments, 'upvotes': link._ups, @@ -3909,9 +3909,9 @@ class PromoteReport(Templated): - max(camp.start_date, self.start)).days bid = camp.bid * (float(effective_duration) / camp_duration) row = { - 'link': link._fullname, + 'link': link._id36, 'owner': owners[link.author_id].name, - 'campaign': fullname, + 'campaign': camp._id36, 'target': camp.sr_name or 'frontpage', 'bid': format_currency(bid, 'USD', locale=c.locale), 'fp_impressions': fp_imps[fullname], diff --git a/r2/r2/templates/promotereport.html b/r2/r2/templates/promotereport.html index ae5ec8446..19308deee 100644 --- a/r2/r2/templates/promotereport.html +++ b/r2/r2/templates/promotereport.html @@ -51,7 +51,7 @@ ${unsafe(js.use('sponsored'))} function(elem) { return elem; } -

link names

+

link ids

@@ -70,7 +70,7 @@ ${unsafe(js.use('sponsored'))} - + @@ -80,7 +80,7 @@ ${unsafe(js.use('sponsored'))} %for row in thing.link_report: - + @@ -106,9 +106,9 @@ ${unsafe(js.use('sponsored'))} - + - +