[CMF-checkins] CVS: Products/CMFDefault - Document.py:1.69.2.3

Tres Seaver tseaver at zope.com
Sat Sep 25 11:34:40 EDT 2004


Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv2322/CMFDefault

Modified Files:
      Tag: CMF-1_5-branch
	Document.py 
Log Message:


  - Compute size of the document on edit (as the length of the "raw" source),
    rather than in 'get_size'.


=== Products/CMFDefault/Document.py 1.69.2.2 => 1.69.2.3 ===
--- Products/CMFDefault/Document.py:1.69.2.2	Tue Sep  7 04:47:54 2004
+++ Products/CMFDefault/Document.py	Sat Sep 25 11:34:10 2004
@@ -90,6 +90,7 @@
     meta_type = 'Document'
     effective_date = expiration_date = None
     cooked_text = text = text_format = ''
+    _size = 0
     _isDiscussable = 1
 
     _stx_level = 1                      # Structured text level
@@ -134,6 +135,7 @@
             raise EditingConflict(msg)
 
         self.text = text
+        self._size = len(text)
 
         if not text_format:
             text_format = self.text_format
@@ -415,6 +417,6 @@
     security.declareProtected(View, 'get_size')
     def get_size( self ):
         """ Used for FTP and apparently the ZMI now too """
-        return len(self.manage_FTPget())
+        return self._size
 
 InitializeClass(Document)



More information about the CMF-checkins mailing list