diff options
| author | klm | 1998-04-22 16:34:47 +0000 |
|---|---|---|
| committer | klm | 1998-04-22 16:34:47 +0000 |
| commit | 1a9c9aca97ae4fc9babfbdeff0b2f06d218e4b49 (patch) | |
| tree | 090e7f190da80ce03c4e0400d966b042056aecc1 | |
| parent | c7d7404629c44c6551d2ff83512f254a53746091 (diff) | |
| download | mailman-1a9c9aca97ae4fc9babfbdeff0b2f06d218e4b49.tar.gz mailman-1a9c9aca97ae4fc9babfbdeff0b2f06d218e4b49.tar.zst mailman-1a9c9aca97ae4fc9babfbdeff0b2f06d218e4b49.zip | |
Add missing titles to the error docs.
| -rwxr-xr-x | cgi/admindb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/cgi/admindb b/cgi/admindb index 4a13897b6..c188fe104 100755 --- a/cgi/admindb +++ b/cgi/admindb @@ -2,7 +2,7 @@ """Produce and process the pending-approval items for a list.""" -__version__ = "$Revision: 384 $" +__version__ = "$Revision: 459 $" import sys sys.path.append('/home/mailman/mailman/modules') @@ -23,6 +23,7 @@ path = os.environ['PATH_INFO'] list_info = mm_utils.GetPathPieces(path) if len(list_info) < 1: + doc.SetTitle("Admindb Error") doc.AddItem(htmlformat.Header(2, "Invalid options to CGI script.")) print doc.Format(bgcolor="#ffffff") sys.exit(0) @@ -32,12 +33,16 @@ list_name = string.lower(list_info[0]) try: list = maillist.MailList(list_name) except: - doc.AddItem(htmlformat.Header(2, "%s: No such list." % list_name)) + msg = "%s: No such list." % list_name + doc.SetTitle("Admindb Error - %s" % msg) + doc.AddItem(htmlformat.Header(2, msg)) print doc.Format(bgcolor="#ffffff") sys.exit(0) if not list._ready: - doc.AddItem(htmlformat.Header(2, "%s: No such list." % list_name)) + msg = "%s: No such list." % list_name + doc.SetTitle("Admindb Error - %s" % msg) + doc.AddItem(htmlformat.Header(2, msg)) print doc.Format(bgcolor="#ffffff") sys.exit(0) @@ -210,7 +215,10 @@ def PrintRequests(doc): try: form = cgi.FieldStorage() if len(form.keys()): + doc.SetTitle("%s Admindb Results" % list.real_name) HandleRequests(doc) + else: + doc.SetTitle("%s Admindb" % list.real_name) PrintRequests(doc) text = doc.Format(bgcolor="#ffffff") print text |
