Bugfix: 'if *list:' is now 'if *list == "True":'

This commit is contained in:
Stefan Ritter 2009-03-02 17:28:19 +01:00
parent 3f689068b3
commit f4adbfd744

View File

@ -72,7 +72,7 @@ else:
print ' <div class="sidebar">' print ' <div class="sidebar">'
if staticpages: if staticpages == "True":
staticpages = [] staticpages = []
staticpages_list = glob.glob(staticpages_dir + '*') staticpages_list = glob.glob(staticpages_dir + '*')
staticpages_list.sort() staticpages_list.sort()
@ -82,10 +82,10 @@ if staticpages:
title = re.sub('\w+?\/\d+?-', '', staticpage) title = re.sub('\w+?\/\d+?-', '', staticpage)
link = re.sub('\w+?\/', '', staticpage) link = re.sub('\w+?\/', '', staticpage)
print ' &nbsp;<a href="?s=' + link + '">' + title + '</a>&nbsp;<br />' print ' &nbsp;<a href="?s=' + link + '">' + title + '</a>&nbsp;<br />'
if monthlist: print ' <br />' if monthlist == "True": print ' <br />'
print ' </div>' print ' </div>'
if monthlist: if monthlist == "True":
olddate = "" olddate = ""
print ' <div class="sidebarentry">' print ' <div class="sidebarentry">'
print ' <small>months</small><br />' print ' <small>months</small><br />'
@ -95,10 +95,10 @@ if monthlist:
if not olddate == date: if not olddate == date:
print ' &nbsp;<a href="?m=' + date + '">' + date_display + '</a>&nbsp;<br />' print ' &nbsp;<a href="?m=' + date + '">' + date_display + '</a>&nbsp;<br />'
olddate = date olddate = date
if linklist: print ' <br />' if linklist == "True": print ' <br />'
print ' </div>' print ' </div>'
if linklist: if linklist == "True":
content = open("linklist", "r") content = open("linklist", "r")
print ' <div class="sidebarentry">' print ' <div class="sidebarentry">'
print ' <small>links</small><br />' print ' <small>links</small><br />'