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
7a240912
Commit
7a240912
authored
Nov 14, 2011
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explicit is better than implicit
parent
5e883aef
Changes
2
Show 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 @
7a240912
...
@@ -36,7 +36,6 @@ from webdav.interfaces import IWriteLock
...
@@ -36,7 +36,6 @@ from webdav.interfaces import IWriteLock
from
webdav.Lockable
import
ResourceLockedError
from
webdav.Lockable
import
ResourceLockedError
from
ZPublisher
import
HTTPRangeSupport
from
ZPublisher
import
HTTPRangeSupport
from
ZPublisher.HTTPRequest
import
FileUpload
from
ZPublisher.HTTPRequest
import
FileUpload
from
ZPublisher.Iterators
import
filestream_iterator
from
zExceptions
import
Redirect
from
zExceptions
import
Redirect
from
zope.contenttype
import
guess_content_type
from
zope.contenttype
import
guess_content_type
from
zope.interface
import
implementedBy
from
zope.interface
import
implementedBy
...
@@ -657,6 +656,9 @@ class File(Persistent, Implicit, PropertyManager,
...
@@ -657,6 +656,9 @@ class File(Persistent, Implicit, PropertyManager,
return
''
return
''
InitializeClass
(
File
)
manage_addImageForm
=
DTMLFile
(
'dtml/imageAdd'
,
globals
(),
manage_addImageForm
=
DTMLFile
(
'dtml/imageAdd'
,
globals
(),
Kind
=
'Image'
,
kind
=
'image'
)
Kind
=
'Image'
,
kind
=
'image'
)
def
manage_addImage
(
self
,
id
,
file
,
title
=
''
,
precondition
=
''
,
content_type
=
''
,
def
manage_addImage
(
self
,
id
,
file
,
title
=
''
,
precondition
=
''
,
content_type
=
''
,
...
@@ -898,6 +900,8 @@ class Image(File):
...
@@ -898,6 +900,8 @@ class Image(File):
return
'%s />'
%
result
return
'%s />'
%
result
InitializeClass
(
Image
)
def
cookId
(
id
,
title
,
file
):
def
cookId
(
id
,
title
,
file
):
if
not
id
and
hasattr
(
file
,
'filename'
):
if
not
id
and
hasattr
(
file
,
'filename'
):
...
...
src/webdav/LockItem.py
View file @
7a240912
...
@@ -19,6 +19,7 @@ import time
...
@@ -19,6 +19,7 @@ import time
from
AccessControl.Owned
import
ownerInfo
from
AccessControl.Owned
import
ownerInfo
from
AccessControl.SecurityInfo
import
ClassSecurityInfo
from
AccessControl.SecurityInfo
import
ClassSecurityInfo
from
App.class_init
import
InitializeClass
from
Persistence
import
Persistent
from
Persistence
import
Persistent
from
zope.interface
import
implements
from
zope.interface
import
implements
...
@@ -173,7 +174,6 @@ class LockItem(Persistent):
...
@@ -173,7 +174,6 @@ class LockItem(Persistent):
return
s
return
s
def
asXML
(
self
):
def
asXML
(
self
):
s
=
"""<?xml version="1.0" encoding="utf-8" ?>
s
=
"""<?xml version="1.0" encoding="utf-8" ?>
<d:prop xmlns:d="DAV:">
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:lockdiscovery>
...
@@ -181,3 +181,5 @@ class LockItem(Persistent):
...
@@ -181,3 +181,5 @@ class LockItem(Persistent):
</d:lockdiscovery>
</d:lockdiscovery>
</d:prop>"""
%
self
.
asLockDiscoveryProperty
(
ns
=
"d"
)
</d:prop>"""
%
self
.
asLockDiscoveryProperty
(
ns
=
"d"
)
return
s
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