You are here

function _antispam_translate_query in AntiSpam 7

Same name and namespace in other branches
  1. 6 antispam.module \_antispam_translate_query()

Expand query for debugging purposes.

Parameters

string $query: SQL statement.

mixed: Array or variable list of arguments.

File

./antispam.module, line 1194
Primary hook implementations for the Antispam module.

Code

function _antispam_translate_query($query) {
  $args = func_get_args();
  array_shift($args);
  $query = db_prefix_tables($query);

  // 'All arguments in one array' syntax.
  if (isset($args[0]) && is_array($args[0])) {
    $args = $args[0];
  }
  _db_query_callback($args, TRUE);
  $query = preg_replace_callback(DB_QUERY_REGEXP, '_db_query_callback', $query);
  return $query;
}