changed trigger for button appearance in footer from blacklist to whitelist: buttons now have to be requested explicitly.

This commit is contained in:
phear 2005-10-09 22:26:07 +00:00
parent bcab27acf1
commit a921e193de
3 changed files with 4 additions and 4 deletions

View file

@ -31,7 +31,7 @@ def debug(req,form, optstr = ""):
else:
req.write("Debug: "+optstr+"<br>\n")
def footer(req,form):
def footer(req,form,display_buttons=0):
"""return html footer"""
try:
username=form["username"]
@ -39,7 +39,7 @@ def footer(req,form):
except: #not logged in
username = ""
sessionid = ""
if ((username != "") and (sessionid != "")) and ("logout" not in form.keys()):
if display_buttons:
data = """
<form method="post">
<input type="hidden" name="sessionid" value="%s">

View file

@ -97,7 +97,7 @@ def game_overview_form(req,form):
""" % (sessionid, username)
else:
data+= "Sorry, all your game slots are in use."
data+=helper.footer(req,form)
data+=helper.footer(req,form,1)
req.write(data)
def login_form(req,form):

View file

@ -81,7 +81,7 @@ def main(req,form):
#print goban
data += goban.display_goban(gobandict,req,form)
data += login.navigation_bar(req,form)
data += helper.footer(req,form)
data += helper.footer(req,form,1)
req.write(data)
else: