Commit 7a240912 authored by 's avatar

explicit is better than implicit

parent 5e883aef
......@@ -36,7 +36,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
......@@ -657,6 +656,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='',
......@@ -898,6 +900,8 @@ class Image(File):
return '%s />' % result
InitializeClass(Image)
def cookId(id, title, file):
if not id and hasattr(file,'filename'):
......
......@@ -19,6 +19,7 @@ import time
from AccessControl.Owned import ownerInfo
from AccessControl.SecurityInfo import ClassSecurityInfo
from App.class_init import InitializeClass
from Persistence import Persistent
from zope.interface import implements
......@@ -173,7 +174,6 @@ class LockItem(Persistent):
return s
def asXML(self):
s = """<?xml version="1.0" encoding="utf-8" ?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
......@@ -181,3 +181,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