~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/action/userprefs.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
    Return error msg_class, msg tuple or None, None.
17
17
    """
18
18
    _ = request.getText
19
 
    sub = request.values.get('handler')
 
19
    sub = request.form.get('handler', [None])[0]
20
20
 
21
21
    if sub in request.cfg.userprefs_disabled:
22
22
        return None, None
63
63
    # returns text, title, msg_class, msg
64
64
    pagename = request.page.page_name
65
65
 
66
 
    if 'handler' in request.values:
 
66
    if 'handler' in request.form:
67
67
        msg_class, msg = _handle_submission(request)
68
68
    else:
69
69
        msg_class, msg = None, None
70
70
 
71
 
    sub = request.args.get('sub', '')
 
71
    sub = request.form.get('sub', [''])[0]
72
72
    cls = None
73
73
    if sub and sub not in request.cfg.userprefs_disabled:
74
74
        try:
98
98
        #      to the generic userprefs page but that is impossible
99
99
        #      due to the way the title is emitted and the theme is
100
100
        #      responsible for doing the linking....
101
 
        title = _("Settings") + ": " + title
 
101
        title = _("Settings") + ":" + title
102
102
    else:
103
103
        title = _("Settings")
 
104
    request.emit_http_headers()
104
105
    request.theme.add_msg(msg, msg_class)
105
106
    request.theme.send_title(title, page=request.page, pagename=pagename)
106
107
    # Start content (important for RTL support)