Commit c8d86baa authored by webchick's avatar webchick
Browse files

Issue #2072603 by legolasbo: Remove Unused local variable from...

Issue #2072603 by legolasbo: Remove Unused local variable  from /core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php.
parent df833f06
......@@ -1028,7 +1028,7 @@ protected function buildCondition($where = 'where') {
if (!empty($info['conditions'])) {
$sub_group = $info['type'] == 'OR' ? db_or() : db_and();
foreach ($info['conditions'] as $key => $clause) {
foreach ($info['conditions'] as $clause) {
// DBTNG doesn't support to add the same subquery twice to the main
// query and the count query, so clone the subquery to have two instances
// of the same object. - http://drupal.org/node/1112854
......@@ -1227,9 +1227,6 @@ public function query($get_count = FALSE) {
$query->distinct();
}
$joins = $where = $having = $orderby = $groupby = '';
$fields = $distinct = array();
// Add all the tables to the query via joins. We assume all LEFT joins.
foreach ($this->table_queue as $table) {
if (is_object($table['join'])) {
......@@ -1321,10 +1318,10 @@ public function query($get_count = FALSE) {
*/
public function getWhereArgs() {
$args = array();
foreach ($this->where as $group => $where) {
foreach ($this->where as $where) {
$args = array_merge($args, $where['args']);
}
foreach ($this->having as $group => $having) {
foreach ($this->having as $having) {
$args = array_merge($args, $having['args']);
}
return $args;
......@@ -1366,7 +1363,6 @@ function build(ViewExecutable $view) {
* $view->current_page.
*/
function execute(ViewExecutable $view) {
$external = FALSE; // Whether this query will run against an external database.
$query = $view->build_info['query'];
$count_query = $view->build_info['count_query'];
......@@ -1382,7 +1378,6 @@ function execute(ViewExecutable $view) {
}
}
$items = array();
if ($query) {
$additional_arguments = \Drupal::moduleHandler()->invokeAll('views_query_substitutions', array($view));
......@@ -1542,7 +1537,7 @@ function loadEntities(&$results) {
// Drupal core currently has no way to load multiple revisions. Sad.
if ($table['revision']) {
$entities = array();
foreach ($ids as $index => $revision_id) {
foreach ($ids as $revision_id) {
$entity = entity_revision_load($entity_type, $revision_id);
if ($entity) {
$entities[$revision_id] = $entity;
......
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