[CMF-checkins] CVS: Products/CMFDefault/skins/zpt_control -
setRedirect.py:1.2
Yvo Schubbe
y.2004_ at wcm-solutions.de
Tue Jul 6 11:41:22 EDT 2004
Update of /cvs-repository/Products/CMFDefault/skins/zpt_control
In directory cvs.zope.org:/tmp/cvs-serv28044/CMFDefault/skins/zpt_control
Modified Files:
setRedirect.py
Log Message:
- use similar code for similar tasks in setRedirect.py and getBatchNavigation.py
- getBatchNavigation.py now also filters out all empty (false) variables
=== Products/CMFDefault/skins/zpt_control/setRedirect.py 1.1 => 1.2 ===
--- Products/CMFDefault/skins/zpt_control/setRedirect.py:1.1 Tue Jun 1 12:53:08 2004
+++ Products/CMFDefault/skins/zpt_control/setRedirect.py Tue Jul 6 11:40:51 2004
@@ -6,6 +6,7 @@
utool = getToolByName(script, 'portal_url')
portal_url = utool()
+
try:
target = provider.getActionInfo(action_path)['url']
except ValueError:
@@ -17,10 +18,7 @@
if not v:
del kw[k]
-if kw:
- query = make_query(kw)
- context.REQUEST.RESPONSE.redirect( '%s?%s' % (target, query) )
-else:
- context.REQUEST.RESPONSE.redirect(target)
+query = kw and ( '?%s' % make_query(kw) ) or ''
+context.REQUEST.RESPONSE.redirect( '%s%s' % (target, query) )
return True
More information about the CMF-checkins
mailing list