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
7184107c
Commit
7184107c
authored
Mar 04, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
c33f3a26
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
lib/python/OFS/Folder.py
lib/python/OFS/Folder.py
+3
-3
lib/python/OFS/PropertySheets.py
lib/python/OFS/PropertySheets.py
+9
-7
No files found.
lib/python/OFS/Folder.py
View file @
7184107c
...
...
@@ -105,9 +105,9 @@
Folders are the basic container objects and are analogous to directories.
$Id: Folder.py,v 1.6
6 1999/03/03 22:41:32
brian Exp $"""
$Id: Folder.py,v 1.6
7 1999/03/04 17:44:51
brian Exp $"""
__version__
=
'$Revision: 1.6
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.6
7
$'
[
11
:
-
2
]
import
Globals
,
SimpleItem
,
Acquisition
,
mimetypes
,
content_types
from
Globals
import
HTMLFile
...
...
@@ -191,7 +191,7 @@ class Folder(ObjectManager, PropertyManager, RoleManager, Collection,
'manage_acquiredForm'
,
'manage_acquiredPermissions'
,
'manage_permissionForm'
,
'manage_roleForm'
)),
(
'Delete objects'
,
(
'manage_delObjects'
,)),
(
'Delete objects'
,
(
'manage_delObjects'
,
'DELETE'
)),
(
'Manage properties'
,
(
'manage_addProperty'
,
'manage_editProperties'
,
'manage_delProperties'
,
'manage_changeProperties'
,)),
...
...
lib/python/OFS/PropertySheets.py
View file @
7184107c
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Property sheets"""
__version__
=
'$Revision: 1.1
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
2
$'
[
11
:
-
2
]
import
time
,
string
,
App
.
Management
from
ZPublisher.Converters
import
type_converters
...
...
@@ -257,7 +257,7 @@ class PropertySheet(Persistent, Implicit):
# of the WebDAV support machinery. If a property set does
# not support WebDAV, this method should return an empty
# string.
propstat
=
'<d:propstat xmlns:
ps
="%s">
\
n
'
\
propstat
=
'<d:propstat xmlns:
n
="%s">
\
n
'
\
' <d:prop>
\
n
'
\
'%%s
\
n
'
\
' </d:prop>
\
n
'
\
...
...
@@ -266,13 +266,14 @@ class PropertySheet(Persistent, Implicit):
errormsg
=
' <d:responsedescription>%s</d:responsedescription>
\
n
'
result
=
[]
if
not
allprop
and
not
names
:
#
propname request
#
return property names only.
for
name
in
self
.
propertyIds
():
result
.
append
(
' <
ps
:%s/>'
%
name
)
result
.
append
(
' <
n
:%s/>'
%
name
)
if
not
result
:
return
''
result
=
join
(
result
,
'
\
n
'
)
return
propstat
%
(
result
,
'200 OK'
,
''
)
elif
allprop
:
# return property names and values.
for
item
in
self
.
propertyMap
():
name
,
type
=
item
[
'id'
],
item
.
get
(
'type'
,
'string'
)
meta
=
item
.
get
(
'meta'
,
{})
...
...
@@ -283,18 +284,19 @@ class PropertySheet(Persistent, Implicit):
value
=
join
(
value
,
'
\
n
'
)
if
meta
.
get
(
'dav_xml'
,
0
):
prop
=
value
else
:
prop
=
' <
ps:%s>%s</ps
:%s>'
%
(
name
,
value
,
name
)
else
:
prop
=
' <
n:%s>%s</n
:%s>'
%
(
name
,
value
,
name
)
result
.
append
(
prop
)
if
not
result
:
return
''
result
=
join
(
result
,
'
\
n
'
)
return
propstat
%
(
result
,
'200 OK'
,
''
)
else
:
# return names and values for named properties.
propdict
=
self
.
_propdict
()
xml_id
=
self
.
xml_namespace
()
for
name
,
ns
in
names
:
if
ns
==
xml_id
:
if
not
propdict
.
has_key
(
name
):
prop
=
' <
ps
:%s/>'
%
name
prop
=
' <
n
:%s/>'
%
name
emsg
=
errormsg
%
'Property not found: %s'
%
name
result
.
append
(
propstat
%
(
prop
,
'404 Not Found'
,
emsg
))
else
:
...
...
@@ -309,7 +311,7 @@ class PropertySheet(Persistent, Implicit):
if
meta
.
get
(
'dav_xml'
,
0
):
prop
=
value
else
:
prop
=
' <
ps:%s>%s</ps
:%s>'
%
(
name
,
value
,
name
)
prop
=
' <
n:%s>%s</n
:%s>'
%
(
name
,
value
,
name
)
result
.
append
(
propstat
%
(
prop
,
'200 OK'
,
''
))
if
not
result
:
return
''
return
join
(
result
,
''
)
...
...
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