WebStats: prepare /channels/NAME/subdir style url
parent
78a5bd0f39
commit
f3f6815022
|
@ -102,9 +102,19 @@ class HTTPHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
|||
elif self.path.startswith('/%s/' % _('channels')):
|
||||
response = 200
|
||||
content_type = 'text/html'
|
||||
chanName = self.path.split('/')[2]
|
||||
output = getTemplate('chan_index').get(not testing, chanName,
|
||||
self.server.db)
|
||||
splittedPath = self.path.split('/')
|
||||
chanName = splittedPath[2]
|
||||
print splittedPath
|
||||
if len(splittedPath) == 3:
|
||||
output = getTemplate('chan_index').get(not testing,
|
||||
chanName,
|
||||
self.server.db)
|
||||
else:
|
||||
subdir = splittedPath[3]
|
||||
output = getTemplate('chan_index').get(not testing,
|
||||
chanName,
|
||||
self.server.db,
|
||||
subdir)
|
||||
else:
|
||||
response = 404
|
||||
content_type = 'text/html'
|
||||
|
|
|
@ -48,7 +48,7 @@ headers = (_('Hour'), _('Lines'), _('Words'), _('Joins'), _('Parts'),
|
|||
tableHeaders = '<table><tr>'
|
||||
for header in headers:
|
||||
tableHeaders += '<th style="width: 100px;">%s</th>' % header
|
||||
def get(useSkeleton, channel, db):
|
||||
def get(useSkeleton, channel, db, orderby=None):
|
||||
channel = '#' + channel
|
||||
items = db.getChanGlobalData(channel)
|
||||
bound = db.getChanRecordingTimeBoundaries(channel)
|
||||
|
|
Loading…
Reference in New Issue