Commit 65c27dbc authored by Nicolas Delaby's avatar Nicolas Delaby

Remove getToolByName

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39359 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 85ead7ad
...@@ -639,7 +639,7 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedCo ...@@ -639,7 +639,7 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedCo
reference = self.getReference() reference = self.getReference()
if not reference: if not reference:
return return
catalog = getToolByName(self.getPortalObject(), 'portal_catalog') catalog = self.getPortalObject().portal_catalog
res = catalog(reference=self.getReference(), sort_on=(('creation_date','ascending'),)) res = catalog(reference=self.getReference(), sort_on=(('creation_date','ascending'),))
# XXX this should be security-unaware - delegate to script with proxy roles # XXX this should be security-unaware - delegate to script with proxy roles
return res[0].getLanguage() # XXX what happens if it is empty? return res[0].getLanguage() # XXX what happens if it is empty?
......
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