comparison roundup/cgi/actions.py @ 3133:708ce3b664d4 maint-0.8

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Sat, 12 Feb 2005 00:59:47 +0000
parents 326ad9da0b75
children 7ca7407133b7
comparison
equal deleted inserted replaced
3131:96086801bd61 3133:708ce3b664d4
1 #$Id: actions.py,v 1.40.2.2 2005-01-05 22:13:28 richard Exp $ 1 #$Id: actions.py,v 1.40.2.3 2005-02-12 00:54:36 richard Exp $
2 2
3 import re, cgi, StringIO, urllib, Cookie, time, random 3 import re, cgi, StringIO, urllib, Cookie, time, random
4 4
5 from roundup import hyperdb, token, date, password, rcsv 5 from roundup import hyperdb, token, date, password, rcsv
6 from roundup.i18n import _ 6 from roundup.i18n import _
149 # parse the environment and figure what the query _is_ 149 # parse the environment and figure what the query _is_
150 req = templating.HTMLRequest(self.client) 150 req = templating.HTMLRequest(self.client)
151 151
152 # The [1:] strips off the '?' character, it isn't part of the 152 # The [1:] strips off the '?' character, it isn't part of the
153 # query string. 153 # query string.
154 url = req.indexargs_href('', {})[1:] 154 url = req.indexargs_url('', {})[1:]
155 155
156 key = self.db.query.getkey() 156 key = self.db.query.getkey()
157 if key: 157 if key:
158 # edit the old way, only one query per name 158 # edit the old way, only one query per name
159 try: 159 try:
554 url += self.nodeid 554 url += self.nodeid
555 url += '?@ok_message=%s&@template=%s'%(urllib.quote(message), 555 url += '?@ok_message=%s&@template=%s'%(urllib.quote(message),
556 urllib.quote(self.template)) 556 urllib.quote(self.template))
557 if self.nodeid is None: 557 if self.nodeid is None:
558 req = templating.HTMLRequest(self.client) 558 req = templating.HTMLRequest(self.client)
559 url += '&' + req.indexargs_href('', {})[1:] 559 url += '&' + req.indexargs_url('', {})[1:]
560 raise exceptions.Redirect, url 560 raise exceptions.Redirect, url
561 561
562 class NewItemAction(EditCommon): 562 class NewItemAction(EditCommon):
563 def handle(self): 563 def handle(self):
564 ''' Add a new item to the database. 564 ''' Add a new item to the database.

Roundup Issue Tracker: http://roundup-tracker.org/