Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
2c2ae720
Commit
2c2ae720
authored
May 29, 2013
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2002332
by mikedotexe, elvis2: Rename Views method add_table() to addTable().
parent
7ab5c07b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
15 deletions
+15
-15
core/modules/field/lib/Drupal/field/Plugin/views/relationship/EntityReverse.php
.../Drupal/field/Plugin/views/relationship/EntityReverse.php
+1
-1
core/modules/search/lib/Drupal/search/Plugin/views/argument/Search.php
...search/lib/Drupal/search/Plugin/views/argument/Search.php
+1
-1
core/modules/search/lib/Drupal/search/Plugin/views/filter/Search.php
...s/search/lib/Drupal/search/Plugin/views/filter/Search.php
+1
-1
core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php
...rupal/taxonomy/Plugin/views/relationship/NodeTermData.php
+1
-1
core/modules/views/lib/Drupal/views/ManyToOneHelper.php
core/modules/views/lib/Drupal/views/ManyToOneHelper.php
+6
-6
core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
...Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
+1
-1
core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php
...modules/views/lib/Drupal/views/Plugin/views/query/Sql.php
+3
-3
core/modules/views/lib/Drupal/views/Plugin/views/sort/MenuHierarchy.php
...iews/lib/Drupal/views/Plugin/views/sort/MenuHierarchy.php
+1
-1
No files found.
core/modules/field/lib/Drupal/field/Plugin/views/relationship/EntityReverse.php
View file @
2c2ae720
...
...
@@ -65,7 +65,7 @@ public function query() {
$first_join
=
drupal_container
()
->
get
(
'plugin.manager.views.join'
)
->
createInstance
(
$id
,
$first
);
$this
->
first_alias
=
$this
->
query
->
add
_t
able
(
$this
->
definition
[
'field table'
],
$this
->
relationship
,
$first_join
);
$this
->
first_alias
=
$this
->
query
->
add
T
able
(
$this
->
definition
[
'field table'
],
$this
->
relationship
,
$first_join
);
// Second, relate the field table to the entity specified using
// the entity id on the field table and the entity's id field.
...
...
core/modules/search/lib/Drupal/search/Plugin/views/argument/Search.php
View file @
2c2ae720
...
...
@@ -79,7 +79,7 @@ public function query($group_by = FALSE) {
$search_condition
->
condition
(
"
$search_index
.type"
,
$base_table
);
if
(
!
$this
->
search_query
->
simple
())
{
$search_dataset
=
$this
->
query
->
add
_t
able
(
'search_dataset'
);
$search_dataset
=
$this
->
query
->
add
T
able
(
'search_dataset'
);
$conditions
=
$this
->
search_query
->
conditions
();
$condition_conditions
=&
$conditions
->
conditions
();
foreach
(
$condition_conditions
as
$key
=>
&
$condition
)
{
...
...
core/modules/search/lib/Drupal/search/Plugin/views/filter/Search.php
View file @
2c2ae720
...
...
@@ -159,7 +159,7 @@ public function query() {
}
$search_condition
->
condition
(
"
$search_index
.type"
,
$base_table
);
if
(
!
$this
->
search_query
->
simple
())
{
$search_dataset
=
$this
->
query
->
add
_t
able
(
'search_dataset'
);
$search_dataset
=
$this
->
query
->
add
T
able
(
'search_dataset'
);
$conditions
=
$this
->
search_query
->
conditions
();
$condition_conditions
=&
$conditions
->
conditions
();
foreach
(
$condition_conditions
as
$key
=>
&
$condition
)
{
...
...
core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php
View file @
2c2ae720
...
...
@@ -72,7 +72,7 @@ public function query() {
$def
[
'table'
]
=
'taxonomy_term_data'
;
if
(
!
array_filter
(
$this
->
options
[
'vids'
]))
{
$taxonomy_index
=
$this
->
query
->
add
_t
able
(
'taxonomy_index'
,
$this
->
relationship
);
$taxonomy_index
=
$this
->
query
->
add
T
able
(
'taxonomy_index'
,
$this
->
relationship
);
$def
[
'left_table'
]
=
$taxonomy_index
;
$def
[
'left_field'
]
=
'tid'
;
$def
[
'field'
]
=
'tid'
;
...
...
core/modules/views/lib/Drupal/views/ManyToOneHelper.php
View file @
2c2ae720
...
...
@@ -65,7 +65,7 @@ public function getField() {
* link point and adds *that* as a new relationship and then adds the table to
* the relationship, if necessary.
*/
function
add
_t
able
(
$join
=
NULL
,
$alias
=
NULL
)
{
public
function
add
T
able
(
$join
=
NULL
,
$alias
=
NULL
)
{
// This is used for lookups in the many_to_one table.
$field
=
$this
->
handler
->
relationship
.
'_'
.
$this
->
handler
->
table
.
'.'
.
$this
->
handler
->
field
;
...
...
@@ -97,7 +97,7 @@ function add_table($join = NULL, $alias = NULL) {
}
// And now add our table, using the new relationship if one was used.
$alias
=
$this
->
handler
->
query
->
add
_t
able
(
$this
->
handler
->
table
,
$relationship
,
$join
,
$alias
);
$alias
=
$this
->
handler
->
query
->
add
T
able
(
$this
->
handler
->
table
,
$relationship
,
$join
,
$alias
);
// Store what values are used by this table chain so that other chains can
// automatically discard those values.
...
...
@@ -148,7 +148,7 @@ function summary_join() {
);
}
}
return
$this
->
add
_t
able
(
$join
);
return
$this
->
add
T
able
(
$join
);
}
}
...
...
@@ -188,7 +188,7 @@ public function ensureMyTable() {
}
}
$this
->
handler
->
tableAlias
=
$this
->
add
_t
able
(
$join
);
$this
->
handler
->
tableAlias
=
$this
->
add
T
able
(
$join
);
}
return
$this
->
handler
->
tableAlias
;
...
...
@@ -220,7 +220,7 @@ public function ensureMyTable() {
}
$this
->
handler
->
view
->
many_to_one_aliases
[
$field
][
$value
]
=
$this
->
handler
->
table
.
'_value_'
.
(
$this
->
handler
->
view
->
many_to_one_count
[
$this
->
handler
->
table
]
++
);
}
$alias
=
$this
->
handler
->
tableAliases
[
$value
]
=
$this
->
add
_t
able
(
$join
,
$this
->
handler
->
view
->
many_to_one_aliases
[
$field
][
$value
]);
$alias
=
$this
->
handler
->
tableAliases
[
$value
]
=
$this
->
add
T
able
(
$join
,
$this
->
handler
->
view
->
many_to_one_aliases
[
$field
][
$value
]);
// and set table_alias to the first of these.
if
(
empty
(
$this
->
handler
->
tableAlias
))
{
...
...
@@ -244,7 +244,7 @@ public function ensureMyTable() {
);
}
$this
->
handler
->
tableAlias
=
$this
->
add
_t
able
(
$join
);
$this
->
handler
->
tableAlias
=
$this
->
add
T
able
(
$join
);
}
}
return
$this
->
handler
->
tableAlias
;
...
...
core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
View file @
2c2ae720
...
...
@@ -828,7 +828,7 @@ function summary_name_field() {
if
(
$j
)
{
$join
=
clone
$j
;
$join
->
leftTable
=
$this
->
tableAlias
;
$this
->
name_table_alias
=
$this
->
query
->
add
_t
able
(
$this
->
name_table
,
$this
->
relationship
,
$join
);
$this
->
name_table_alias
=
$this
->
query
->
add
T
able
(
$this
->
name_table
,
$this
->
relationship
,
$join
);
}
}
else
{
...
...
core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php
View file @
2c2ae720
...
...
@@ -364,7 +364,7 @@ function add_relationship($alias, JoinPluginBase $join, $base, $link_point = NUL
* adding parts to the query. Or FALSE if the table was not able to be
* added.
*/
function
add
_t
able
(
$table
,
$relationship
=
NULL
,
JoinPluginBase
$join
=
NULL
,
$alias
=
NULL
)
{
public
function
add
T
able
(
$table
,
$relationship
=
NULL
,
JoinPluginBase
$join
=
NULL
,
$alias
=
NULL
)
{
if
(
!
$this
->
ensure_path
(
$table
,
$relationship
,
$join
))
{
return
FALSE
;
}
...
...
@@ -379,7 +379,7 @@ function add_table($table, $relationship = NULL, JoinPluginBase $join = NULL, $a
/**
* Add a table to the query without ensuring the path.
*
* This is a pretty internal function to Views and add
_t
able() or
* This is a pretty internal function to Views and add
T
able() or
* ensure_table() should be used instead of this one, unless you are
* absolutely sure this is what you want.
*
...
...
@@ -554,7 +554,7 @@ function ensure_table($table, $relationship = NULL, JoinPluginBase $join = NULL)
//
// This can be done safely here but not lower down in
// queue_table(), because queue_table() is also used by
// add
_t
able() which requires the ability to intentionally add
// add
T
able() which requires the ability to intentionally add
// the same table with the same join multiple times. For
// example, a view that filters on 3 taxonomy terms using AND
// needs to join taxonomy_term_data 3 times with the same join.
...
...
core/modules/views/lib/Drupal/views/Plugin/views/sort/MenuHierarchy.php
View file @
2c2ae720
...
...
@@ -53,7 +53,7 @@ public function query() {
);
$join
=
Views
::
pluginManager
(
'join'
)
->
createInstance
(
'standard'
,
$definition
);
$menu_links
=
$this
->
query
->
add
_t
able
(
'menu_links'
,
NULL
,
$join
);
$menu_links
=
$this
->
query
->
add
T
able
(
'menu_links'
,
NULL
,
$join
);
$this
->
query
->
add_orderby
(
$menu_links
,
'weight'
,
$this
->
options
[
'order'
]);
$this
->
query
->
add_orderby
(
$menu_links
,
'link_title'
,
$this
->
options
[
'order'
]);
}
...
...
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