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
9802bb20
Commit
9802bb20
authored
Jun 14, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added back getSize - people are still using it.
parent
34a9c58e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
lib/python/OFS/DTMLMethod.py
lib/python/OFS/DTMLMethod.py
+5
-2
lib/python/OFS/Image.py
lib/python/OFS/Image.py
+5
-3
No files found.
lib/python/OFS/DTMLMethod.py
View file @
9802bb20
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
##############################################################################
##############################################################################
"""DTML Method objects."""
"""DTML Method objects."""
__version__
=
'$Revision: 1.4
7
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.4
8
$'
[
11
:
-
2
]
import
History
import
History
from
Globals
import
HTML
,
HTMLFile
,
MessageDialog
from
Globals
import
HTML
,
HTMLFile
,
MessageDialog
...
@@ -182,7 +182,10 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager,
...
@@ -182,7 +182,10 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager,
def
get_size
(
self
):
def
get_size
(
self
):
return
len
(
self
.
raw
)
return
len
(
self
.
raw
)
# deprecated; use get_size!
getSize
=
get_size
def
validate
(
self
,
inst
,
parent
,
name
,
value
,
md
):
def
validate
(
self
,
inst
,
parent
,
name
,
value
,
md
):
return
getSecurityManager
().
validate
(
inst
,
parent
,
name
,
value
)
return
getSecurityManager
().
validate
(
inst
,
parent
,
name
,
value
)
...
...
lib/python/OFS/Image.py
View file @
9802bb20
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
##############################################################################
##############################################################################
"""Image object"""
"""Image object"""
__version__
=
'$Revision: 1.10
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.10
6
$'
[
11
:
-
2
]
import
Globals
,
string
,
struct
,
content_types
import
Globals
,
string
,
struct
,
content_types
from
OFS.content_types
import
guess_content_type
from
OFS.content_types
import
guess_content_type
...
@@ -370,8 +370,10 @@ class File(Persistent,Implicit,PropertyManager,
...
@@ -370,8 +370,10 @@ class File(Persistent,Implicit,PropertyManager,
size
=
self
.
size
size
=
self
.
size
if
size
is
None
:
size
=
len
(
self
.
data
)
if
size
is
None
:
size
=
len
(
self
.
data
)
return
size
return
size
# deprecated; use get_size!
getSize
=
get_size
def
getContentType
(
self
):
def
getContentType
(
self
):
"""Get the content type of a file or image.
"""Get the content type of a file or image.
...
...
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