Commit 4289ce9f authored by Ivan Tyagov's avatar Ivan Tyagov

Use much safer restrictedTraverse (thanks Romain).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20978 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 52384493
...@@ -133,10 +133,7 @@ while crumb is not None:\n ...@@ -133,10 +133,7 @@ while crumb is not None:\n
crumb = None # Don\'t go higher than the first Web Site found\n crumb = None # Don\'t go higher than the first Web Site found\n
else:\n else:\n
# try accessing parent object (which might not always be possible)\n # try accessing parent object (which might not always be possible)\n
try:\n crumb = context.restrictedTraverse(\'/\'.join(crumb.getPhysicalPath()[:-1]), None)\n
crumb = crumb.aq_parent\n
except:\n
crumb = None\n
\n \n
crumb_list.reverse()\n crumb_list.reverse()\n
return crumb_list\n return crumb_list\n
...@@ -193,6 +190,8 @@ return crumb_list\n ...@@ -193,6 +190,8 @@ return crumb_list\n
<string>crumb_list</string> <string>crumb_list</string>
<string>None</string> <string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>_getitem_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
628 629
\ No newline at end of file \ No newline at end of file
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