[CMF-checkins] CVS: CMF - DiscussionItem.py:1.9.2.1 File.py:1.5.2.1 Image.py:1.4.2.1 NewsItem.py:1.3.2.1 migrate_ptk.py:1.2.2.1
Martijn Pieters
mj@digicool.com
Mon, 9 Apr 2001 11:48:34 -0400 (EDT)
Update of /cvs-repository/CMF/CMFDefault
In directory korak:/tmp/cvs-serv5396/CMFDefault
Modified Files:
Tag: CMF-1_0-branch
DiscussionItem.py File.py Image.py NewsItem.py migrate_ptk.py
Log Message:
Merge 'getId()' fix from trunk.
--- Updated File DiscussionItem.py in package CMF --
--- DiscussionItem.py 2001/03/29 15:48:59 1.9
+++ DiscussionItem.py 2001/04/09 15:48:01 1.9.2.1
@@ -158,7 +158,7 @@
else:
prefix = portal_url()
- return fmt_string % ( prefix, parent_rel_url, str( self.id ) )
+ return fmt_string % ( prefix, parent_rel_url, str( self.getId() ) )
def getPhysicalPath(self):
"""
@@ -330,7 +330,7 @@
for item in self._container.values():
if item.in_reply_to == my_url:
if wf.getInfoFor( item, 'review_state' ) == 'published':
- result.append(item.id)
+ result.append(item.getId())
return result
--- Updated File File.py in package CMF --
--- File.py 2001/03/29 15:48:59 1.5
+++ File.py 2001/04/09 15:48:01 1.5.2.1
@@ -161,6 +161,10 @@
# gnashing of teeth and fraying of nerves. Don't do it.
#
# Really.
+ #
+ # Note that if you use getId() to retrieve an object's ID, you will avoid
+ # this problem altogether. getId is the new way, accessing .id is
+ # deprecated.
meta_type='Portal File'
effective_date = expiration_date = None
@@ -231,7 +235,7 @@
"""
RESPONSE.setHeader('Content-Disposition',
- 'attachment; filename=%s' % self.id())
+ 'attachment; filename=%s' % self.getId())
return OFS.Image.File.index_html(self, REQUEST, RESPONSE)
index_html = download
--- Updated File Image.py in package CMF --
--- Image.py 2001/03/29 15:48:59 1.4
+++ Image.py 2001/04/09 15:48:01 1.4.2.1
@@ -159,6 +159,10 @@
# gnashing of teeth and fraying of nerves. Don't do it.
#
# Really.
+ #
+ # Note that if you use getId() to retrieve an object's ID, you will avoid
+ # this problem altogether. getId is the new way, accessing .id is
+ # deprecated.
meta_type='Portal Image'
effective_date = expiration_date = None
--- Updated File NewsItem.py in package CMF --
--- NewsItem.py 2001/03/29 15:48:59 1.3
+++ NewsItem.py 2001/04/09 15:48:01 1.3.2.1
@@ -184,7 +184,7 @@
if not headers.has_key( 'Format' ): # not supplied in headers
from NullPortalResource import sniffContentType
- sniffFmt = sniffContentType( self.id, body )
+ sniffFmt = sniffContentType( self.getId(), body )
fmt = REQUEST.get_header( 'content-type', sniffFmt )
headers[ 'Format' ] = fmt
--- Updated File migrate_ptk.py in package CMF --
--- migrate_ptk.py 2001/03/05 22:33:03 1.2
+++ migrate_ptk.py 2001/04/09 15:48:01 1.2.2.1
@@ -107,7 +107,7 @@
newob = k.__basicnew__()
else:
newob = new.instance(k, {})
- try: newob.id = ob.id
+ try: newob.id = ob.getId()
except AttributeError: pass
newob.__dict__.update(ob.__dict__)
if hasattr(newob, '_objects'):