Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
ec703495
Commit
ec703495
authored
Nov 14, 2011
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explicit is better than implicit
parent
b865f123
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
src/OFS/Image.py
src/OFS/Image.py
+5
-1
src/webdav/LockItem.py
src/webdav/LockItem.py
+3
-1
No files found.
src/OFS/Image.py
View file @
ec703495
...
...
@@ -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'
):
...
...
src/webdav/LockItem.py
View file @
ec703495
...
...
@@ -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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment