Update of /cvsroot/tmda/tmda/contrib/cgi
In directory sc8-pr-cvs1:/tmp/cvs-serv20487
Modified Files:
tmda-cgi.py
Log Message:
Added code to call Release module if triggered by a URL-release link.
Index: tmda-cgi.py
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/tmda-cgi.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- tmda-cgi.py 30 Nov 2002 18:15:18 -0000 1.3
+++ tmda-cgi.py 6 Dec 2002 17:16:53 -0000 1.4
@@ -44,6 +44,11 @@
import pwd
import Session
+try:
+ import paths
+except ImportError:
+ pass
+
# Process any CGI fields
Form = cgi.FieldStorage()
@@ -52,17 +57,26 @@
def main():
"Figure out which page we're on and pass control along."
-
+
+ # First visit to any page?
+ if not Form.keys():
+ # Release an e-mail by URL?
+ if os.environ["QUERY_STRING"]:
+ import Release
+ Release.Release(os.environ["QUERY_STRING"])
+ # Initial, non-debug login
+ else:
+ import Login
+ Login.Show()
+
# Logged in yet?
- if not PVars.has_key("UID"):
+ elif not PVars.has_key("UID"):
import Login
if Form.has_key("cmd"):
Login.Show("Wrong password. Try again.")
else:
if Form.has_key("debug"):
Login.Show(Debug = Form["debug"].value)
- else:
- Login.Show()
elif Form.has_key("cmd"):
# Just log in?
_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs