From f15436e672d9655c9b4abb7c0237dbf4800d7914 Mon Sep 17 00:00:00 2001 From: Simon Morgan Date: Mon, 17 Nov 2008 00:05:09 +0000 Subject: [PATCH] Remove redundant call to common.getnumposts(). --- index.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.cgi b/index.cgi index 7f77da5..e40d173 100755 --- a/index.cgi +++ b/index.cgi @@ -22,7 +22,8 @@ print "Content-type: text/html; charset=UTF-8\n" conn = common.connect() -if common.getnumposts(conn) == 0: +numposts = common.getnumposts(conn) +if numposts == 0: print '

Nothing here yet. How about you post something interesting?

' else: if form.has_key("id"): @@ -43,7 +44,6 @@ else: if newoffset < 0: newoffset = 0 print 'Prev' % newoffset - numposts = common.getnumposts(conn) if offset + config.NUMPOSTS < numposts: newoffset = offset + config.NUMPOSTS print 'Next' % newoffset -- 2.11.4.GIT