Fix send_footer()
authorBernie Innocenti <bernie@codewiz.org>
Tue, 23 Mar 2010 00:39:19 +0000 (20:39 -0400)
committerBernie Innocenti <bernie@codewiz.org>
Tue, 23 Mar 2010 00:39:19 +0000 (20:39 -0400)
geekigeeki.py

index 00d74ceddf409a7ec29a2c79e80a5f74ffdb3773..f088774ea6d0c4ab2f912ea73a1aede57faf06b2 100755 (executable)
@@ -714,14 +714,15 @@ class Page:
     def can_read(self):
         return self.can("read", True)
 
-    def send_footer(mtime=None, footer="sys/footer"):
+    def send_footer(self):
         if config_get('debug_cgi', False):
             cgi.print_arguments()
             cgi.print_form(form)
             cgi.print_environ()
+        footer = self.pragma("footer", "sys/footer")
         if footer != "off":
             link_inline(footer, kvargs = {
-                'LAST_MODIFIED': strftime(config_get('datetime_fmt', '%a %d %b %Y %I:%M %p'), localtime(mtime))
+                'LAST_MODIFIED': strftime(config_get('datetime_fmt', '%a %d %b %Y %I:%M %p'), localtime(self._mtime()))
             })
         print("</body></html>")
 
@@ -742,7 +743,7 @@ class Page:
             msg_text=self.msg_text, msg_type=self.msg_type, writable=self.can_write(), mtime=self._mtime(),
             navbar=self.pragma("navbar", "on"))
         self.send_naked()
-        self.send_footer(mtime=self._mtime(), footer=self.pragma("footer", "sys/footer"))
+        self.send_footer()
 
     def send_editor(self, preview=None):
         send_title(None, 'Edit ' + self.split_title(), msg_text=self.msg_text, msg_type=self.msg_type)