Same name and namespace in other branches
  1. 6.x-3.x includes/view.inc \view::end_query_capture()

Add the list of queries run during render to buildinfo.

See also

view::start_query_capture()

1 call to view::end_query_capture()
view::render in includes/view.inc
Render this view for a certain display.

File

includes/view.inc, line 1785
views_objects Objects that represent a View or part of a view

Class

view

Code

public function end_query_capture() {
  global $conf, $queries;
  if (!empty($this->fix_dev_query)) {
    $conf['dev_query'] = FALSE;
  }

  // Make a copy of the array so we can manipulate it with array_splice.
  $temp = $queries;

  // Scroll through the queries until we get to our last query key.
  // Unset anything in our temp array.
  if (isset($this->last_query_key)) {
    foreach ($queries as $id => $query) {
      if ($id == $this->last_query_key) {
        break;
      }
      unset($temp[$id]);
    }
  }
  $this->additional_queries = $temp;
}