From cc8b1427c58a9fabbe49197ecd93ea721efdddd2 Mon Sep 17 00:00:00 2001 From: Simon Morgan Date: Sun, 8 Feb 2009 22:57:41 +0000 Subject: [PATCH] Rename common.displaypost to common.print_post. --- common.py | 2 +- index.cgi | 4 ++-- post.cgi | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common.py b/common.py index c88567f..13d1cc5 100644 --- a/common.py +++ b/common.py @@ -45,7 +45,7 @@ def printheaders(title): print '' print '' -def displaypost(title, body, date=None): +def print_post(title, body, date=None): """Formats and prints a post""" print '
' print '

%s

' % title diff --git a/index.cgi b/index.cgi index da90e8d..62a4b4c 100755 --- a/index.cgi +++ b/index.cgi @@ -39,7 +39,7 @@ else: if form.has_key("id"): if common.getnumposts(conn, form.getvalue("id")) > 0: (title, text, date) = conn.execute("SELECT title, text, date FROM entries WHERE id = ?", (form.getvalue("id"),)).fetchone() - common.displaypost(title, text, date) + common.print_post(title, text, date) else: print "

No such post.

" else: @@ -48,7 +48,7 @@ else: offset = int(form.getvalue("offset")) for (postid, title, text, date) in conn.execute("SELECT id, title, text, date FROM entries ORDER BY date DESC LIMIT ? OFFSET ?", (config.NUMPOSTS, offset)): title = '%s' % (postid, title) - common.displaypost(title, text, date) + common.print_post(title, text, date) # Only print the navigation bar if the number of posts exceeds # the number to be displayed per page. diff --git a/post.cgi b/post.cgi index 73b3e2e..77a732b 100755 --- a/post.cgi +++ b/post.cgi @@ -76,7 +76,7 @@ if form.has_key("preview"): # one. if form.has_key("update"): print '' % form.getvalue("update") - common.displaypost(edit_title, edit_text) + common.print_post(edit_title, edit_text) print '
' print '' % cgi.escape(edit_title, True) -- 2.11.4.GIT