Skip to content

Commit b770226

Browse files
author
Richard Jones
committed
fix CGI editCSV action to handle metakit's integer itemids
- apply fix for "remove" links from Klamer Schutte - added permission check on "remove" link while I was there..
1 parent 6f39a8c commit b770226

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Fixed:
77
- Importing wasn't setting None values explicitly when it should have been
88
- Fixed import warning regarding 0xffff0000 literal, finally, really this
99
time. Checked on win2k. (sf bug 786711)
10+
- fix CGI editCSV action to handle metakit's integer itemids
11+
- apply fix for "remove" links from Klamer Schutte
12+
- added permission check on "remove" link while I was there..
1013

1114

1215
2003-08-08 0.6.0

doc/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Florian Schulze,
8181
Dougal Scott,
8282
Stefan Seefeld,
8383
Jeffrey P Shell,
84+
Klamer Schutte,
8485
Joel Shprentz,
8586
Terrel Shumway,
8687
Nathaniel Smith,

roundup/cgi/client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.130 2003-08-13 23:51:59 richard Exp $
1+
# $Id: client.py,v 1.131 2003-08-28 01:39:15 richard Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
@@ -995,14 +995,14 @@ def editItemAction(self):
995995
try:
996996
props, links = self.parsePropsFromForm()
997997
except (ValueError, KeyError), message:
998-
self.error_message.append(_('Error: ') + str(message))
998+
self.error_message.append(_('Parse Error: ') + str(message))
999999
return
10001000

10011001
# handle the props
10021002
try:
10031003
message = self._editnodes(props, links)
10041004
except (ValueError, KeyError, IndexError), message:
1005-
self.error_message.append(_('Error: ') + str(message))
1005+
self.error_message.append(_('Apply Error: ') + str(message))
10061006
return
10071007

10081008
# commit now that all the tricky stuff is done
@@ -1252,10 +1252,10 @@ def editCSVAction(self):
12521252
found[nodeid] = 1
12531253

12541254
# see if the node exists
1255-
if cl.hasnode(nodeid):
1256-
exists = 1
1257-
else:
1255+
if nodeid in ('x', 'X') or not cl.hasnode(nodeid):
12581256
exists = 0
1257+
else:
1258+
exists = 1
12591259

12601260
# confirm correct weight
12611261
if len(idlessprops) != len(values):

templates/classic/html/issue.item.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ <h2>
140140
<th tal:content="string:Author: ${msg/author}">author</th>
141141
<th tal:content="string:Date: ${msg/date}">date</th>
142142
<th>
143-
<a tal:attributes="href string:?:remove:messages=${msg/id}&:action=edit">remove</a>
143+
<a tal:condition="context/is_edit_ok"
144+
tal:attributes="href string:issue${context/id}?:remove:messages=${msg/id}&:action=edit">remove</a>
144145
</th>
145146
</tr>
146147
<tr>

0 commit comments

Comments
 (0)