mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Wiki: Correctly fix getting subreddit name from revision model
This commit is contained in:
@@ -150,10 +150,7 @@ class WikiRevision(tdb_cassandra.UuidThing, Printable):
|
||||
|
||||
@property
|
||||
def sr(self):
|
||||
id36 = self.info['sr']
|
||||
if c.site._id36 == id36:
|
||||
return c.site.name
|
||||
return Subreddit._byID36(id36).name
|
||||
return self.info['sr']
|
||||
|
||||
|
||||
class WikiPage(tdb_cassandra.Thing):
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
|
||||
%if not c.page:
|
||||
<td>
|
||||
<a href="/r/${thing.sr}/wiki/${thing.page}">${thing.page}</a>
|
||||
<a href="${c.wiki_base_url}/${thing.page}">${thing.page}</a>
|
||||
</td>
|
||||
%endif
|
||||
|
||||
<td>
|
||||
<a href="/r/${thing.sr}/wiki/${thing.page}?v=${thing._id}">view</a>
|
||||
<a href="${c.wiki_base_url}/${thing.page}?v=${thing._id}">view</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@@ -63,7 +63,7 @@
|
||||
<a href="#" class="revision_hide" data-revision="${thing._id}" data-page="${thing.page}">hide</a>
|
||||
</td>
|
||||
<td class="wiki_revert" style="white-space: nowrap;">
|
||||
${ynbutton(_("revert here"), _("done"), "../r/%s/wiki/api/revert/%s/%s" % (thing.sr, thing._id, thing.page), post_callback="$.refresh")}
|
||||
${ynbutton(_("revert here"), _("done"), "..%s/api/revert/%s/%s" % (c.wiki_base_url, thing._id, thing.page), post_callback="$.refresh")}
|
||||
</td>
|
||||
%endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user