mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
added a /comments and fixed an independent.co.uk button bug
This commit is contained in:
@@ -89,7 +89,7 @@ def make_map(global_conf={}, app_conf={}):
|
||||
action='oldinfo', dest='comments', type='ancient')
|
||||
mc('/info/:article/:dest/:comment', controller='front',
|
||||
action='oldinfo', type='old', dest='comments', comment=None)
|
||||
|
||||
|
||||
mc('/related/:article/:title', controller='front',
|
||||
action = 'related', title=None)
|
||||
mc('/details/:article/:title', controller='front',
|
||||
@@ -104,7 +104,7 @@ def make_map(global_conf={}, app_conf={}):
|
||||
|
||||
mc('/', controller='hot', action='listing')
|
||||
|
||||
listing_controllers = "hot|saved|toplinks|new|recommended|randomrising"
|
||||
listing_controllers = "hot|saved|toplinks|new|recommended|randomrising|comments"
|
||||
|
||||
mc('/:controller', action='listing',
|
||||
requirements=dict(controller=listing_controllers))
|
||||
|
||||
@@ -32,6 +32,7 @@ from listingcontroller import MyredditsController
|
||||
from listingcontroller import ByIDController as ByidController
|
||||
from listingcontroller import RandomrisingController
|
||||
from listingcontroller import UserController
|
||||
from listingcontroller import CommentsController
|
||||
|
||||
from feedback import FeedbackController
|
||||
from front import FrontController
|
||||
|
||||
@@ -562,3 +562,9 @@ class MyredditsController(ListingController):
|
||||
def GET_listing(self, where, **env):
|
||||
self.where = where
|
||||
return ListingController.GET_listing(self, **env)
|
||||
|
||||
class CommentsController(ListingController):
|
||||
title_text = _('comments')
|
||||
|
||||
def query(self):
|
||||
return Comment._query(sort = desc('_date'))
|
||||
|
||||
@@ -146,7 +146,7 @@ ${class_def(3)}
|
||||
fullname = thing.link._fullname
|
||||
ups = thing.link.upvotes
|
||||
downs = thing.link.downvotes
|
||||
link = "http://%s%s" % (get_domain(cname = c.cname, subreddit = not c.cname),
|
||||
link = "http://%s%s" % (get_domain(cname = c.cname, subreddit = False),
|
||||
thing.link.make_permalink_slow())
|
||||
else:
|
||||
fullname = ""
|
||||
|
||||
Reference in New Issue
Block a user