comparison roundup/cgi_client.py @ 232:d3edb94047a5

reverted back to sending messages always... regardless of who is doing the web edit. change notes weren't being saved. bleah. hackish.
author Richard Jones <richard@users.sourceforge.net>
date Fri, 17 Aug 2001 00:08:10 +0000
parents 1d1848c99abe
children 8827f5931ea8
comparison
equal deleted inserted replaced
231:afd428ba6523 232:d3edb94047a5
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: cgi_client.py,v 1.21 2001-08-15 23:43:18 richard Exp $ 18 # $Id: cgi_client.py,v 1.22 2001-08-17 00:08:10 richard Exp $
19 19
20 import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes 20 import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes
21 21
22 import roundupdb, htmltemplate, date, hyperdb 22 import roundupdb, htmltemplate, date, hyperdb
23 23
274 designator, property = value.split(':') 274 designator, property = value.split(':')
275 link, nodeid = roundupdb.splitDesignator(designator) 275 link, nodeid = roundupdb.splitDesignator(designator)
276 link = self.db.classes[link] 276 link = self.db.classes[link]
277 link.set(nodeid, **{property: nid}) 277 link.set(nodeid, **{property: nid})
278 278
279 # TODO: this should be an auditor
279 # see if we want to send a message to the nosy list... 280 # see if we want to send a message to the nosy list...
280 props = cl.getprops() 281 props = cl.getprops()
281 # don't do the message thing if there's no nosy list, or the editor 282 # don't do the message thing if there's no nosy list
282 # of the node is the only person on the nosy list - they're already
283 # aware of the change.
284 nosy = 0 283 nosy = 0
285 if props.has_key('nosy'): 284 if props.has_key('nosy'):
286 nosy = cl.get(nid, 'nosy') 285 nosy = cl.get(nid, 'nosy')
287 uid = self.getuid() 286 nosy = len(nosy)
288 if len(nosy) == 1 and uid in nosy:
289 nosy = 0
290 if (nosy and props.has_key('messages') and 287 if (nosy and props.has_key('messages') and
291 isinstance(props['messages'], hyperdb.Multilink) and 288 isinstance(props['messages'], hyperdb.Multilink) and
292 props['messages'].classname == 'msg'): 289 props['messages'].classname == 'msg'):
293 290
294 # handle the note 291 # handle the note
519 props[key] = value 516 props[key] = value
520 return props, changed 517 return props, changed
521 518
522 # 519 #
523 # $Log: not supported by cvs2svn $ 520 # $Log: not supported by cvs2svn $
521 # Revision 1.21 2001/08/15 23:43:18 richard
522 # Fixed some isFooTypes that I missed.
523 # Refactored some code in the CGI code.
524 #
524 # Revision 1.20 2001/08/12 06:32:36 richard 525 # Revision 1.20 2001/08/12 06:32:36 richard
525 # using isinstance(blah, Foo) now instead of isFooType 526 # using isinstance(blah, Foo) now instead of isFooType
526 # 527 #
527 # Revision 1.19 2001/08/07 00:24:42 richard 528 # Revision 1.19 2001/08/07 00:24:42 richard
528 # stupid typo 529 # stupid typo

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