[CMF-checkins] CVS: CMF/CMFDefault - File.py:1.18.32.1 Image.py:1.16.32.1 Link.py:1.20.4.1

Tres Seaver tseaver@zope.com
Wed, 10 Jul 2002 01:40:41 -0400


Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv8351/CMFDefault

Modified Files:
      Tag: CMF-1_3-branch
	File.py Image.py Link.py 
Log Message:

  
    - Ensured that Link, File, and Image content objects reindex themselves
      after edit (wrapping 'edit' as a WorkflowMethod no longer guarantees
      that).


=== CMF/CMFDefault/File.py 1.18 => 1.18.32.1 ===
             if t: return 1
             else: return 0
 
-    def edit(self, precondition='', file=''):
+    def _edit(self, precondition='', file=''):
         """ Perform changes for user """
         if precondition: self.precondition = precondition
         elif self.precondition: del self.precondition
@@ -207,6 +207,12 @@
             self.manage_upload(file)
 
         self.setFormat(self.content_type)
+
+    def edit(self, precondition='', file=''):
+        """ Update and reindex. """
+        self._edit( precondition, file )
+        self.reindexObject()
+
     edit = WorkflowAction(edit)
 
     def download(self, REQUEST, RESPONSE):


=== CMF/CMFDefault/Image.py 1.16 => 1.16.32.1 ===
             if t: return 1
             else: return 0
 
-    def edit(self, precondition='', file=''):
+    def _edit(self, precondition='', file=''):
         """ Update image. """
         if precondition: self.precondition = precondition
         elif self.precondition: del self.precondition
@@ -197,6 +197,12 @@
             self.manage_upload(file)
 
         self.setFormat(self.content_type)
+
+    def edit(self, precondition='', file=''):
+        """ Update and reindex. """
+        self._edit( precondition, file )
+        self.reindexObject()
+
     edit = WorkflowAction(edit)
 
     def index_html(self, REQUEST, RESPONSE):


=== CMF/CMFDefault/Link.py 1.20 => 1.20.4.1 ===
         self.remote_url = url
 
     security.declareProtected( CMFCorePermissions.ModifyPortalContent, 'edit' )
-    edit = WorkflowAction( _edit )
+
+    def edit(self, remote_url ):
+        """ Update and reindex. """
+        self._edit( remote_url )
+        self.reindexObject()
+
+    edit = WorkflowAction( edit )
 
     security.declareProtected( CMFCorePermissions.View, 'SearchableText' )
     def SearchableText(self):