1- # $Id: client.py,v 1.23 2002-09-09 04:43:10 richard Exp $
1+ # $Id: client.py,v 1.24 2002-09-09 23:38:41 richard Exp $
22
33__doc__ = """
44WWW request handler (also used in the stand-alone server).
@@ -600,13 +600,13 @@ def editItemAction(self):
600600 :multilink=designator:property
601601 The value specifies a node designator and the property on that
602602 node to add _this_ node to as a link or multilink.
603- __note
603+ :note
604604 Create a message and attach it to the current node's
605605 "messages" property.
606- __file
606+ :file
607607 Create a file and attach it to the current node's
608608 "files" property. Attach the file to the message created from
609- the __note if it's supplied.
609+ the :note if it's supplied.
610610
611611 :required=property,property,...
612612 The named properties are required to be filled in the form.
@@ -645,9 +645,9 @@ def editItemAction(self):
645645 if props :
646646 message = _ ('%(changes)s edited ok' )% {'changes' :
647647 ', ' .join (props .keys ())}
648- elif self .form .has_key ('__note ' ) and self .form ['__note ' ].value :
648+ elif self .form .has_key (':note ' ) and self .form [':note ' ].value :
649649 message = _ ('note added' )
650- elif (self .form .has_key ('__file ' ) and self .form ['__file ' ].filename ):
650+ elif (self .form .has_key (':file ' ) and self .form [':file ' ].filename ):
651651 message = _ ('file added' )
652652 else :
653653 message = _ ('nothing changed' )
@@ -969,8 +969,8 @@ def _handle_message(self):
969969 '''
970970 # handle file attachments
971971 files = []
972- if self .form .has_key ('__file ' ):
973- file = self .form ['__file ' ]
972+ if self .form .has_key (':file ' ):
973+ file = self .form [':file ' ]
974974 if file .filename :
975975 filename = file .filename .split ('\\ ' )[- 1 ]
976976 mime_type = mimetypes .guess_type (filename )[0 ]
@@ -987,8 +987,8 @@ def _handle_message(self):
987987 note = None
988988 # in a nutshell, don't do anything if there's no note or there's no
989989 # NOSY
990- if self .form .has_key ('__note ' ):
991- note = self .form ['__note ' ].value .strip ()
990+ if self .form .has_key (':note ' ):
991+ note = self .form [':note ' ].value .strip ()
992992 if not note :
993993 return None , files
994994 if not props .has_key ('messages' ):
@@ -1032,7 +1032,7 @@ def _post_editnode(self, nid):
10321032 which issue to link the file to.
10331033
10341034 TODO: I suspect that this and newfile will go away now that
1035- there's the ability to upload a file using the issue __file form
1035+ there's the ability to upload a file using the issue :file form
10361036 element!
10371037 '''
10381038 cn = self .classname
0 commit comments