Skip to content

Commit 4c22d97

Browse files
committed
attempted admindb fix
1 parent a88cc4c commit 4c22d97

1 file changed

Lines changed: 3 additions & 21 deletions

File tree

Mailman/Cgi/admindb.py

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -933,17 +933,6 @@ def safe_get(key, default=''):
933933
doc.SetTitle(title)
934934
doc.AddItem(Header(2, title))
935935

936-
# Check if there are any pending requests
937-
admindburl = mlist.GetScriptURL('admindb', absolute=1)
938-
if not mlist.NumRequestsPending():
939-
replacements = {
940-
'admindburl': admindburl,
941-
'logout_url': '%s/logout' % admindburl
942-
}
943-
output = mlist.ParseTags('admindb_empty.html', replacements, mlist.preferred_language)
944-
doc.AddItem(output)
945-
return
946-
947936
# Create a form for the overview with proper encoding
948937
form = Form(mlist.GetScriptURL('admindb', absolute=1),
949938
mlist=mlist,
@@ -968,19 +957,12 @@ def safe_get(key, default=''):
968957
# Process the form data
969958
process_submissions(mlist, cgidata)
970959
# Show success message
971-
replacements = {
972-
'admindburl': admindburl
973-
}
974-
output = mlist.ParseTags('admindb_success.html', replacements, mlist.preferred_language)
975-
doc.AddItem(output)
960+
doc.AddItem(Header(2, _('Database Updated...')))
976961
return
977962

978963
# If we get here, something went wrong
979-
replacements = {
980-
'admindburl': admindburl
981-
}
982-
output = mlist.ParseTags('admindb_error.html', replacements, mlist.preferred_language)
983-
doc.AddItem(output)
964+
doc.AddItem(Header(2, _('Error')))
965+
doc.AddItem(Bold(_('Invalid form submission.')))
984966

985967
except Exception as e:
986968
mailman_log('error', 'admindb: Error in process_form: %s\n%s',

0 commit comments

Comments
 (0)