You are here

function advagg_mod_devel_shutdown_query in Advanced CSS/JS Aggregation 7.2

Returns the rendered query log.

1 call to advagg_mod_devel_shutdown_query()
advagg_mod_devel_shutdown_real in advagg_mod/advagg_mod.module
Runs on shutdown to display developer information in the footer.

File

advagg_mod/advagg_mod.module, line 3782
Advanced aggregation modifier module.

Code

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

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

      // Save all queries to a file in temp dir. Retrieved via AJAX.
      advagg_mod_devel_query_put_contents($queries);
    }
    else {

      // @codingStandardsIgnoreLine
      $output = '</div>' . dprint_r($queries, TRUE);
    }
    return $output;
  }
}