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
9f18a95b
Commit
9f18a95b
authored
Jul 29, 2007
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify getting the root
parent
f78e908c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
lib/python/Products/Five/browser/pagetemplatefile.py
lib/python/Products/Five/browser/pagetemplatefile.py
+4
-5
No files found.
lib/python/Products/Five/browser/pagetemplatefile.py
View file @
9f18a95b
...
@@ -18,6 +18,7 @@ $Id$
...
@@ -18,6 +18,7 @@ $Id$
import
zope.app.pagetemplate
import
zope.app.pagetemplate
from
Acquisition
import
aq_base
from
Acquisition
import
aq_base
from
Acquisition
import
aq_get
from
Acquisition
import
aq_parent
from
Acquisition
import
aq_parent
from
AccessControl
import
getSecurityManager
from
AccessControl
import
getSecurityManager
from
Products.PageTemplates.Expressions
import
SecureModuleImporter
from
Products.PageTemplates.Expressions
import
SecureModuleImporter
...
@@ -39,11 +40,9 @@ class ViewPageTemplateFile(zope.app.pagetemplate.ViewPageTemplateFile):
...
@@ -39,11 +40,9 @@ class ViewPageTemplateFile(zope.app.pagetemplate.ViewPageTemplateFile):
# get the root
# get the root
obj
=
context
[
'context'
]
obj
=
context
[
'context'
]
root
=
None
root
=
None
while
(
getattr
(
aq_base
(
obj
),
'getPhysicalRoot'
,
None
)
is
None
meth
=
aq_get
(
obj
,
'getPhysicalRoot'
,
None
)
and
aq_parent
(
obj
)
is
not
None
):
if
meth
is
not
None
:
obj
=
aq_parent
(
obj
)
root
=
meth
()
if
getattr
(
obj
,
'getPhysicalRoot'
,
None
)
is
not
None
:
root
=
obj
.
getPhysicalRoot
()
context
.
update
(
here
=
context
[
'context'
],
context
.
update
(
here
=
context
[
'context'
],
# philiKON thinks container should be the view,
# philiKON thinks container should be the view,
...
...
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