Commit 2e5a9f72 authored by 's avatar

Fixed up unprotected methods

parent 4e6a689d
......@@ -84,7 +84,7 @@
##############################################################################
"""DTML Method objects."""
__version__='$Revision: 1.46 $'[11:-2]
__version__='$Revision: 1.47 $'[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)
......
......@@ -84,7 +84,7 @@
##############################################################################
"""Image object"""
__version__='$Revision: 1.104 $'[11:-2]
__version__='$Revision: 1.105 $'[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', 'getSize',
('index_html', 'view_image_or_file', 'get_size',
'getContentType', '')),
('FTP access',
('manage_FTPstat','manage_FTPget','manage_FTPlist')),
......@@ -362,7 +362,7 @@ class File(Persistent,Implicit,PropertyManager,
RESPONSE.setStatus(204)
return RESPONSE
def getSize(self):
def get_size(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', 'getSize',
('index_html', 'tag', 'view_image_or_file', 'get_size',
'getContentType', '')),
('FTP access',
('manage_FTPstat','manage_FTPget','manage_FTPlist')),
......
......@@ -84,7 +84,7 @@
##############################################################################
"""Property management"""
__version__='$Revision: 1.25 $'[11:-2]
__version__='$Revision: 1.26 $'[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'),
),
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment