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
764ccda5
Commit
764ccda5
authored
Nov 04, 2003
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #1095: Allow TAL paths starting with '/varname' as a
preferred spelling for 'CONTEXTS/varname'.
parent
68249531
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/Products/PageTemplates/Expressions.py
lib/python/Products/PageTemplates/Expressions.py
+3
-3
No files found.
doc/CHANGES.txt
View file @
764ccda5
...
@@ -33,6 +33,9 @@ Zope Changes
...
@@ -33,6 +33,9 @@ Zope Changes
(such as storages, databases, or logging handlers) to be used.
(such as storages, databases, or logging handlers) to be used.
Bugs fixed
Bugs fixed
- Collector #1095: Allow TAL paths starting with '/varname' as a
preferred spelling for 'CONTEXTS/varname'.
- Collector #391: Cut and paste now requires delete permissions.
- Collector #391: Cut and paste now requires delete permissions.
- Collector #331: Referenses to URL in manage_tabs was changed
- Collector #331: Referenses to URL in manage_tabs was changed
...
...
lib/python/Products/PageTemplates/Expressions.py
View file @
764ccda5
...
@@ -17,7 +17,7 @@ Page Template-specific implementation of TALES, with handlers
...
@@ -17,7 +17,7 @@ Page Template-specific implementation of TALES, with handlers
for Python expressions, string literals, and paths.
for Python expressions, string literals, and paths.
"""
"""
__version__
=
'$Revision: 1.4
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.4
4
$'
[
11
:
-
2
]
import
re
,
sys
import
re
,
sys
from
TALES
import
Engine
,
CompilerError
,
_valid_name
,
NAME_RE
,
\
from
TALES
import
Engine
,
CompilerError
,
_valid_name
,
NAME_RE
,
\
...
@@ -115,7 +115,7 @@ class SubPathExpr:
...
@@ -115,7 +115,7 @@ class SubPathExpr:
def
__init__
(
self
,
path
):
def
__init__
(
self
,
path
):
self
.
_path
=
path
=
path
.
strip
().
split
(
'/'
)
self
.
_path
=
path
=
path
.
strip
().
split
(
'/'
)
self
.
_base
=
base
=
path
.
pop
(
0
)
self
.
_base
=
base
=
path
.
pop
(
0
)
if
not
_valid_name
(
base
):
if
base
and
not
_valid_name
(
base
):
raise
CompilerError
,
'Invalid variable name "%s"'
%
base
raise
CompilerError
,
'Invalid variable name "%s"'
%
base
# Parse path
# Parse path
self
.
_dp
=
dp
=
[]
self
.
_dp
=
dp
=
[]
...
@@ -140,7 +140,7 @@ class SubPathExpr:
...
@@ -140,7 +140,7 @@ class SubPathExpr:
# of path names.
# of path names.
path
[
i
:
i
+
1
]
=
list
(
val
)
path
[
i
:
i
+
1
]
=
list
(
val
)
__traceback_info__
=
base
=
self
.
_base
__traceback_info__
=
base
=
self
.
_base
if
base
==
'CONTEXTS'
:
if
base
==
'CONTEXTS'
or
not
base
:
ob
=
econtext
.
contexts
ob
=
econtext
.
contexts
else
:
else
:
ob
=
vars
[
base
]
ob
=
vars
[
base
]
...
...
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