You are here

function devel_shutdown_query in Devel 7

Returns the rendered query log.

Return value

string

1 call to devel_shutdown_query()
devel_shutdown_real in ./devel.module
Runs on shutdown to display developer information in the footer.

File

./devel.module, line 1253
This module holds functions useful for Drupal development.

Code

function devel_shutdown_query($queries) {
  if (!empty($queries)) {
    if (function_exists('theme_get_registry') && theme_get_registry()) {

      // Safe to call theme('table).
      list($counts, $query_summary) = devel_query_summary($queries);
      $output = devel_query_table($queries, $counts);

      // Save all queries to a file in temp dir. Retrieved via AJAX.
      devel_query_put_contents($queries);
    }
    else {
      $output = '</div>' . dprint_r($queries, TRUE);
    }
    return $output;
  }
}