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
2e5a9f72
Commit
2e5a9f72
authored
Jun 12, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed up unprotected methods
parent
4e6a689d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
lib/python/OFS/DTMLMethod.py
lib/python/OFS/DTMLMethod.py
+2
-3
lib/python/OFS/Image.py
lib/python/OFS/Image.py
+4
-6
lib/python/OFS/PropertyManager.py
lib/python/OFS/PropertyManager.py
+3
-2
No files found.
lib/python/OFS/DTMLMethod.py
View file @
2e5a9f72
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""DTML Method objects."""
__version__
=
'$Revision: 1.4
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.4
7
$'
[
11
:
-
2
]
import
History
from
Globals
import
HTML
,
HTMLFile
,
MessageDialog
...
...
@@ -141,7 +141,7 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager,
'document_src'
,
'PrincipiaSearchSource'
)),
(
'Change DTML Methods'
,
(
'manage_edit'
,
'manage_upload'
,
'PUT'
)),
(
'Change proxy roles'
,
(
'manage_proxyForm'
,
'manage_proxy'
)),
(
'View'
,
(
'__call__'
,
''
)),
(
'View'
,
(
'__call__'
,
'
get_size'
,
'
'
)),
(
'FTP access'
,
(
'manage_FTPstat'
,
'manage_FTPget'
,
'manage_FTPlist'
)),
)
...
...
@@ -182,7 +182,6 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager,
def
get_size
(
self
):
return
len
(
self
.
raw
)
getSize
=
get_size
def
validate
(
self
,
inst
,
parent
,
name
,
value
,
md
):
return
getSecurityManager
().
validate
(
inst
,
parent
,
name
,
value
)
...
...
lib/python/OFS/Image.py
View file @
2e5a9f72
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Image object"""
__version__
=
'$Revision: 1.10
4
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.10
5
$'
[
11
:
-
2
]
import
Globals
,
string
,
struct
,
content_types
from
OFS.content_types
import
guess_content_type
...
...
@@ -162,7 +162,7 @@ class File(Persistent,Implicit,PropertyManager,
(
'Change Images and Files'
,
(
'manage_edit'
,
'manage_upload'
,
'PUT'
)),
(
'View'
,
(
'index_html'
,
'view_image_or_file'
,
'get
S
ize'
,
(
'index_html'
,
'view_image_or_file'
,
'get
_s
ize'
,
'getContentType'
,
''
)),
(
'FTP access'
,
(
'manage_FTPstat'
,
'manage_FTPget'
,
'manage_FTPlist'
)),
...
...
@@ -362,7 +362,7 @@ class File(Persistent,Implicit,PropertyManager,
RESPONSE
.
setStatus
(
204
)
return
RESPONSE
def
get
S
ize
(
self
):
def
get
_s
ize
(
self
):
"""Get the size of a file or image.
Returns the size of the file or image.
...
...
@@ -371,7 +371,6 @@ class File(Persistent,Implicit,PropertyManager,
if
size
is
None
:
size
=
len
(
self
.
data
)
return
size
get_size
=
getSize
def
getContentType
(
self
):
"""Get the content type of a file or image.
...
...
@@ -380,7 +379,6 @@ class File(Persistent,Implicit,PropertyManager,
"""
return
self
.
content_type
size
=
getSize
def
__str__
(
self
):
return
str
(
self
.
data
)
def
__len__
(
self
):
return
1
...
...
@@ -436,7 +434,7 @@ class Image(File):
(
'Change Images and Files'
,
(
'manage_edit'
,
'manage_upload'
,
'PUT'
)),
(
'View'
,
(
'index_html'
,
'tag'
,
'view_image_or_file'
,
'get
S
ize'
,
(
'index_html'
,
'tag'
,
'view_image_or_file'
,
'get
_s
ize'
,
'getContentType'
,
''
)),
(
'FTP access'
,
(
'manage_FTPstat'
,
'manage_FTPget'
,
'manage_FTPlist'
)),
...
...
lib/python/OFS/PropertyManager.py
View file @
2e5a9f72
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Property management"""
__version__
=
'$Revision: 1.2
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
6
$'
[
11
:
-
2
]
import
ExtensionClass
,
Globals
import
ZDOM
...
...
@@ -185,7 +185,8 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes):
'manage_changePropertyTypes'
,
)),
(
'Access contents information'
,
(
'hasProperty'
,
'propertyIds'
,
'propertyValues'
,
'propertyItems'
,
''
),
(
'hasProperty'
,
'propertyIds'
,
'propertyValues'
,
'propertyItems'
,
'getProperty'
,
'getPropertyType'
,
'propertyMap'
,
''
),
(
'Anonymous'
,
'Manager'
),
),
)
...
...
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