Commit ec703495 authored by 's avatar

explicit is better than implicit

parent b865f123
......@@ -34,7 +34,6 @@ from webdav.interfaces import IWriteLock
from webdav.Lockable import ResourceLockedError
from ZPublisher import HTTPRangeSupport
from ZPublisher.HTTPRequest import FileUpload
from ZPublisher.Iterators import filestream_iterator
from zExceptions import Redirect
from zope.contenttype import guess_content_type
from zope.interface import implementedBy
......@@ -654,6 +653,9 @@ class File(Persistent, Implicit, PropertyManager,
return ''
InitializeClass(File)
manage_addImageForm=DTMLFile('dtml/imageAdd',globals(),
Kind='Image',kind='image')
def manage_addImage(self, id, file, title='', precondition='', content_type='',
......@@ -893,6 +895,8 @@ class Image(File):
return '%s />' % result
InitializeClass(Image)
def cookId(id, title, file):
if not id and hasattr(file,'filename'):
......
......@@ -15,6 +15,7 @@
import time
from AccessControl.class_init import InitializeClass
from AccessControl.owner import ownerInfo
from AccessControl.SecurityInfo import ClassSecurityInfo
from Persistence import Persistent
......@@ -171,7 +172,6 @@ class LockItem(Persistent):
return s
def asXML(self):
s = """<?xml version="1.0" encoding="utf-8" ?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
......@@ -179,3 +179,5 @@ class LockItem(Persistent):
</d:lockdiscovery>
</d:prop>""" % self.asLockDiscoveryProperty(ns="d")
return s
InitializeClass(LockItem)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment