Update of /cvsroot/tmda/tmda/contrib/cgi
In directory sc8-pr-cvs1:/tmp/cvs-serv6250

Modified Files:
        tmda-cgi.py Login.py 
Log Message:
Changed some environment variables used so tmda-cgi works with webserver WN.


Index: tmda-cgi.py
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/tmda-cgi.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- tmda-cgi.py 16 Jan 2003 22:13:32 -0000      1.7
+++ tmda-cgi.py 24 Mar 2003 21:54:03 -0000      1.8
@@ -21,7 +21,7 @@
 
 """Web interface to TMDA tools.
 
-This program is expected to be called as a CGI.  See contrib/cgi/INSTALL for
+This program is expected to be called as a CGI.  See htdocs/tmda-cgi.html for
 specific instructions on using this file.
 
 Fields:
@@ -67,13 +67,16 @@
   # 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"])
+    try:
+      if os.environ["QUERY_STRING"]:
+        import Release
+        Release.Release(os.environ["QUERY_STRING"])
+        return
+    except KeyError:
+      pass
     # Initial, non-debug login
-    else:
-      import Login
-      Login.Show()
+    import Login
+    Login.Show()
 
   # Logged in yet?
   elif not PVars.has_key("UID"):

Index: Login.py
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/Login.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Login.py    1 Feb 2003 17:09:57 -0000       1.5
+++ Login.py    24 Mar 2003 21:54:05 -0000      1.6
@@ -73,4 +73,4 @@
 </table>
 </body>
 </html>
-""" % (CgiUtil.DispDir, os.environ["REQUEST_URI"], Msg, Debug)
+""" % (CgiUtil.DispDir, os.environ["SCRIPT_NAME"], Msg, Debug)

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs

Reply via email to