[CMF-checkins] CVS: Products/CMFDefault - Document.py:1.72
Tres Seaver
tseaver at zope.com
Sat Sep 25 16:32:37 EDT 2004
Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv6878/CMFDefault
Modified Files:
Document.py
Log Message:
- Forward-port performance fix for 'Document.get_size'.
=== Products/CMFDefault/Document.py 1.71 => 1.72 ===
--- Products/CMFDefault/Document.py:1.71 Tue Sep 7 04:48:38 2004
+++ Products/CMFDefault/Document.py Sat Sep 25 16:32:07 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