|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -# $Id: cgi_client.py,v 1.24 2001-08-29 04:49:39 richard Exp $ |
| 18 | +# $Id: cgi_client.py,v 1.25 2001-08-29 05:30:49 richard Exp $ |
19 | 19 |
|
20 | 20 | import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes |
21 | 21 |
|
@@ -276,20 +276,20 @@ def _post_editnode(self, nid, changes=None): |
276 | 276 | link = self.db.classes[link] |
277 | 277 | link.set(nodeid, **{property: nid}) |
278 | 278 |
|
279 | | - # generate an edit message - nosyreactor will send it |
280 | | - # don't bother if there's no messages or nosy list |
| 279 | + # generate an edit message |
| 280 | + # don't bother if there's no messages or nosy list |
281 | 281 | props = cl.getprops() |
282 | | - nosy = len(cl.get(nid, 'nosy', [])) |
283 | | - if (nosy and props.has_key('messages') and |
| 282 | + note = None |
| 283 | + if self.form.has_key('__note'): |
| 284 | + note = self.form['__note'] |
| 285 | + note = note.value |
| 286 | + send = len(cl.get(nid, 'nosy', [])) or note |
| 287 | + if (send and props.has_key('messages') and |
284 | 288 | isinstance(props['messages'], hyperdb.Multilink) and |
285 | 289 | props['messages'].classname == 'msg'): |
286 | 290 |
|
287 | 291 | # handle the note |
288 | | - note = None |
289 | | - if self.form.has_key('__note'): |
290 | | - note = self.form['__note'] |
291 | | - if note is not None and note.value: |
292 | | - note = note.value |
| 292 | + if note: |
293 | 293 | if '\n' in note: |
294 | 294 | summary = re.split(r'\n\r?', note)[0] |
295 | 295 | else: |
@@ -513,6 +513,9 @@ def parsePropsFromForm(cl, form, nodeid=0): |
513 | 513 |
|
514 | 514 | # |
515 | 515 | # $Log: not supported by cvs2svn $ |
| 516 | +# Revision 1.24 2001/08/29 04:49:39 richard |
| 517 | +# didn't clean up fully after debugging :( |
| 518 | +# |
516 | 519 | # Revision 1.23 2001/08/29 04:47:18 richard |
517 | 520 | # Fixed CGI client change messages so they actually include the properties |
518 | 521 | # changed (again). |
|
0 commit comments