Changeset 909


Ignore:
Timestamp:
20 Nov 2006, 13:45:07 (18 years ago)
Author:
joachim
Message:

=redirect_url in mail2student corrected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/mail2student.py

    r891 r909  
    2626
    2727#prop.email_from_address should be used for To:
    28 
     28REQUEST = context.REQUEST
     29url_tuple = REQUEST.HTTP_REFERER.split('?')
     30if len(url_tuple) == 2:
     31    url_tuple[1] ='portal_status_message=Your message has been sent!'
     32else:
     33    url_tuple.append('portal_status_message=Your message has been sent!')
     34redirect_url = "?".join(url_tuple)
     35REQUEST.set('rurl', redirect_url) # to see the result in the error log
    2936msg = message % (
    3037     co_name,
    3138     co_email,
    32      student_email,     
     39     student_email, 
    3340     co_email,
    3441     'henrik@waeup.org',
     
    4350RESPONSE = REQUEST.RESPONSE
    4451
    45 redirect_url = REQUEST.HTTP_REFERER
    46 redirect_url = '%s/?%s' % (redirect_url,'portal_status_message=Your message has been sent!')
    4752RESPONSE.redirect(redirect_url)
Note: See TracChangeset for help on using the changeset viewer.