1- # $Id: cgi_client.py,v 1.13 2001-07-30 08:12:17 richard Exp $
1+ # $Id: cgi_client.py,v 1.14 2001-08-02 00:26:16 richard Exp $
22
33import os , cgi , pprint , StringIO , urlparse , re , traceback , mimetypes
44
@@ -348,8 +348,23 @@ def _post_editnode(self, nid):
348348 if (cl .getprops ().has_key ('messages' ) and
349349 cl .getprops ()['messages' ].isMultilinkType and
350350 cl .getprops ()['messages' ].classname == 'msg' ):
351+ # handle the note
352+ note = None
353+ if self .form .has_key ('__note' ):
354+ note = self .form ['__note' ]
355+ if note is not None and note .value :
356+ note = note .value
357+ if '\n ' in note :
358+ summary = re .split (r'\n\r?' , note )[0 ]
359+ else :
360+ summary = note
361+ m = ['%s\n ' % note )
362+ else :
363+ summary = 'This %s has been created through the web.\n ' % cn
364+ m = [summary ]
365+ m .append ('\n -------\n ' )
366+
351367 # generate an edit message - nosyreactor will send it
352- m = []
353368 for name , prop in cl .getprops ().items ():
354369 value = cl .get (nid , name )
355370 if prop .isLinkType :
@@ -371,21 +386,6 @@ def _post_editnode(self, nid):
371386 value = ', ' .join (l )
372387 m .append ('%s: %s' % (name , value ))
373388
374- # handle the note
375- note = None
376- if self .form .has_key ('__note' ):
377- note = self .form ['__note' ]
378- if note is not None and note .value :
379- note = note .value
380- if '\n ' in note :
381- summary = re .split (r'\n\r?' , note )[0 ]
382- else :
383- summary = note
384- m .append ('\n %s\n ' % note )
385- else :
386- summary = 'This %s has been created through the web.' % cn
387- m .append ('\n %s\s' % summary )
388-
389389 # now create the message
390390 content = '\n ' .join (m )
391391 message_id = self .db .msg .create (author = '1' , recipients = [],
@@ -519,6 +519,9 @@ def __del__(self):
519519
520520#
521521# $Log: not supported by cvs2svn $
522+ # Revision 1.13 2001/07/30 08:12:17 richard
523+ # Added time logging and file uploading to the templates.
524+ #
522525# Revision 1.12 2001/07/30 06:26:31 richard
523526# Added some documentation on how the newblah works.
524527#
0 commit comments