From: Nikolay K. <faf...@us...> - 2004-09-21 11:08:56
|
Update of /cvsroot/collective/CMFBoard/uihelpers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27680/uihelpers Modified Files: MessageView.py Log Message: Index: MessageView.py =================================================================== RCS file: /cvsroot/collective/CMFBoard/uihelpers/MessageView.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- MessageView.py 14 Sep 2004 16:36:09 -0000 1.10 +++ MessageView.py 21 Sep 2004 11:08:47 -0000 1.11 @@ -5,6 +5,7 @@ $Id$ """ +import traceback from Globals import InitializeClass from AccessControl import ClassSecurityInfo from Products.CMFCore.utils import _checkPermission, getToolByName @@ -153,7 +154,7 @@ }) else: size = attach.getSize() - + if size: attach_file = {} attach_file['url'] = '%s/%s' % (url, attach.getId()) @@ -163,13 +164,14 @@ if mtr is None: attach_file['icon'] = 'unknown.png' - - mti = mtr.lookup(attach.content_type)[0] - attach_file['icon'] = mti.icon_path + else: + mti = mtr.lookup(attach.content_type)[0] + attach_file['icon'] = mti.icon_path + files.append(attach_file) except: pass - + data['files'] = files data['images'] = images |