Skip to content

Commit

Permalink
CRM-18773
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslee001 committed Aug 1, 2016
1 parent ffeb104 commit e3b4406
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions DB/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -2471,21 +2471,6 @@ function _query($string)
return $this->raiseError($result);
}

/* CRM-3225 */
if (function_exists('variable_get') && variable_get('dev_query', 0)) {
// this is for drupal devel module
// If devel.module query logging is enabled, prepend a comment with the username and calling function
// to the SQL string.
$bt = debug_backtrace();
// t() may not be available yet so we don't wrap 'Anonymous'
$name = $user->uid ? $user->name : variable_get('anonymous', 'Anonymous');
$query = $bt[3]['function'] ."\n/* ". $name .' */ '. str_replace("\n ", '', $string);
list($usec, $sec) = explode(' ', microtime());
$stop = (float)$usec + (float)$sec;
$diff = $stop - $time;
$queries[] = array($query, $diff);
}

$action = strtolower(substr(trim($string),0,6));

if (!empty($_DB_DATAOBJECT['CONFIG']['debug']) || defined('CIVICRM_DEBUG_LOG_QUERY')) {
Expand Down

0 comments on commit e3b4406

Please sign in to comment.