Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
9aba650eea6b
Commit
3485679a
authored
Mar 30, 2011
by
Sylvain Thénault
Browse files
[rql rewriter] drop unused argument
--HG-- branch : stable
parent
01b23ec9c066
Changes
1
Hide whitespace changes
Inline
Side-by-side
rqlrewrite.py
View file @
9aba650e
# copyright 2003-201
0
LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2003-201
1
LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of CubicWeb.
...
...
@@ -434,7 +434,7 @@ class RQLRewriter(object):
# no more references, undefine the variable
del
self
.
select
.
defined_vars
[
vref
.
name
]
def
_may_be_shared_with
(
self
,
sniprel
,
target
,
searchedvarname
):
def
_may_be_shared_with
(
self
,
sniprel
,
target
):
"""if the snippet relation can be skipped to use a relation from the
original query, return that relation node
"""
...
...
@@ -561,12 +561,12 @@ class RQLRewriter(object):
if
self
.
existingvars
and
not
self
.
keep_var
(
rhs
.
name
):
return
if
lhs
.
name
in
self
.
revvarmap
and
rhs
.
name
!=
'U'
:
orel
=
self
.
_may_be_shared_with
(
node
,
'object'
,
lhs
.
name
)
orel
=
self
.
_may_be_shared_with
(
node
,
'object'
)
if
orel
is
not
None
:
self
.
_use_orig_term
(
rhs
.
name
,
orel
.
children
[
1
].
children
[
0
])
return
elif
rhs
.
name
in
self
.
revvarmap
and
lhs
.
name
!=
'U'
:
orel
=
self
.
_may_be_shared_with
(
node
,
'subject'
,
rhs
.
name
)
orel
=
self
.
_may_be_shared_with
(
node
,
'subject'
)
if
orel
is
not
None
:
self
.
_use_orig_term
(
lhs
.
name
,
orel
.
children
[
0
])
return
...
...
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