handlers.py
changeset 78 85345abbd46a
parent 77 4287fb77e312
child 79 43ac75054d5c
--- a/handlers.py	Tue Feb 10 01:05:35 2009 +0200
+++ b/handlers.py	Tue Feb 10 01:24:59 2009 +0200
@@ -87,8 +87,8 @@
         lines           = lines,
     )
 
-@preferences.handler(prefs.formatter, prefs.timezone)
-def channel_link (request, channel, timestamp, formatter, timezone) :
+@preferences.handler(prefs.formatter, prefs.timezone, prefs.count)
+def channel_link (request, channel, timestamp, formatter, timezone, count) :
     """
         Display channel_date for specific UTC timestamp
     """
@@ -96,8 +96,8 @@
     # convert timestamp to user's timezone
     timestamp = timestamp.astimezone(timezone)
 
-    # get latest events
-    lines = channel.source.get_date(timestamp)
+    # get correct day's correct page of lines
+    page, max, lines = channel.source.get_date_paged(timestamp, count)
 
     # lines
     lines = formatter.format_html(lines)
@@ -108,6 +108,9 @@
         prefs           = request.prefs,
         channel         = channel,
         date            = timestamp,
+        page            = page,
+        count           = count,
+        max             = max,
         lines           = lines,
     )
 
@@ -149,7 +152,7 @@
     # fix date timezone
     date = date.replace(tzinfo=timezone)
 
-    # get latest events
+    # get that day's events, either paged or not
     if page :
         page, max, lines = channel.source.get_date_paged(date, count, page)