[CMF-checkins] CVS: CMF/CMFDefault - Document.py:1.39.2.1 Link.py:1.13.2.1
Tres Seaver
tseaver@zope.com
Mon, 10 Dec 2001 17:36:05 -0500
Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv25479/CMFDefault
Modified Files:
Tag: CMF-1_2-branch
Document.py Link.py
Log Message:
- Assorted Zope 2.3 compatibility hacks^H^H^H^H^Hfixes:
o CatalogTool: Accomodate both versions of 'ZCatalog.catalog_object'
(Zope 2.4 adds new 'idxs' argument).
o PortalContent: test for present of WebDAV locking; patch around
its absence in Zope 2.3.
o TypesTool: patch around absence of named Unauthorized exception
in Zope 2.3 and Zope 2.4.
o Document: patch around absence of WebDAV locking in 2.3.
o Link: patch around different return value (trailing slash) from
Python 1.5.2's 'urlparse.urlunparse'.
=== CMF/CMFDefault/Document.py 1.39 => 1.39.2.1 ===
from Globals import DTMLFile, InitializeClass
from AccessControl import ClassSecurityInfo, getSecurityManager
+
from Products.CMFCore.PortalContent import PortalContent
-from DublinCore import DefaultDublinCoreImpl
-from webdav.Lockable import ResourceLockedError
+from Products.CMFCore.PortalContent import NoWL, ResourceLockedError
from Products.CMFCore import CMFCorePermissions
from Products.CMFCore.WorkflowCore import WorkflowAction
from Products.CMFCore.utils import _format_stx, keywordsplitter
+
+from DublinCore import DefaultDublinCoreImpl
from utils import parseHeadersBody, SimpleHTMLParser, bodyfinder, _dtmldir
factory_type_information = ( { 'id' : 'Document'
@@ -340,8 +342,9 @@
def PUT(self, REQUEST, RESPONSE):
""" Handle HTTP (and presumably FTP?) PUT requests """
- self.dav__init(REQUEST, RESPONSE)
- self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
+ if not NoWL:
+ self.dav__init(REQUEST, RESPONSE)
+ self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
body = REQUEST.get('BODY', '')
guessedformat = REQUEST.get_header('Content-Type', 'text/plain')
ishtml = (guessedformat == 'text/html') or utils.html_headcheck(body)
=== CMF/CMFDefault/Link.py 1.13 => 1.13.2.1 ===
else:
self.remote_url = 'http://' + remote_url
+ if self.remote_url[-1] == '/':
+ self.remote_url = self.remote_url[:-1]
edit = WorkflowAction(edit)