Skip to content

Commit

Permalink
Misc trivial tweaks, mark as 2.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Apr 17, 2012
1 parent 817c528 commit 3eaf53b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
15 changes: 6 additions & 9 deletions components/db_queries.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,14 @@ function add_component_time( $component, $ltime, $type ) {

function process_db_object( $id, $db ) {

$rows = array();
$types = array();
$total_time = 0;
$total_qs = 0;
$has_results = false;
$has_components= false;
$rows = array();
$types = array();
$total_time = 0;
$total_qs = 0;

foreach ( (array) $db->queries as $query ) {

# @TODO: is this needed now?
if ( false !== strpos( $query[2], 'wp_admin_bar' ) and !isset( $_REQUEST['qm_display_all'] ) )
if ( false !== strpos( $query[2], 'wp_admin_bar' ) and !isset( $_REQUEST['qm_display_admin_bar'] ) )
continue;

$sql = $query[0];
Expand Down Expand Up @@ -301,7 +298,7 @@ function process_db_object( $id, $db ) {
else
$func = reset( array_reverse( explode( ', ', $funcs ) ) );

$sql = $this->format_sql( $sql );
$sql = $this->format_sql( $sql );
$type = preg_split( '/\b/', $sql );
$type = strtoupper( $type[1] );

Expand Down
2 changes: 1 addition & 1 deletion components/environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function output( $args, $data ) {
$append = '';

if ( $val['after'] != $val['before'] )
$append .= '<br /><span class="qm-info">' . sprintf( __( 'Overridden from %s', 'query-monitor' ), $val['before'] ) . '</span>';
$append .= '<br /><span class="qm-info">' . sprintf( __( 'Overridden at runtime from %s', 'query-monitor' ), $val['before'] ) . '</span>';

echo '<tr>';
echo "<td>{$key}</td>";
Expand Down
2 changes: 1 addition & 1 deletion query-monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Plugin Name: Query Monitor
Description: Monitoring of database queries, hooks, conditionals and more.
Version: 2.2.3b
Version: 2.2.3
Author: John Blackbourn
Author URI: http://lud.icro.us/
Text Domain: query-monitor
Expand Down
10 changes: 3 additions & 7 deletions wp-content/db.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
Plugin Name: Query Monitor
Version: 2.2.3b
Version: 2.2.3
Move this file into your wp-content directory to provide additional
database query information in Query Monitor's output.
Expand Down Expand Up @@ -146,10 +146,6 @@ function query( $query ) {
return $return_val;
}

function get_caller( $_trace ) {
return implode( ', ', array_reverse( $this->backtrace( $_trace ) ) );
}

function get_stack( $_trace ) {

$stack = array();
Expand All @@ -165,7 +161,7 @@ function get_stack( $_trace ) {

}

function backtrace( $_trace ) {
function get_caller( $_trace ) {

if ( !$this->qm_filtered and function_exists( 'did_action' ) and did_action( 'plugins_loaded' ) ) {

Expand All @@ -185,7 +181,7 @@ function backtrace( $_trace ) {
$file = str_replace( $path, '', $file );
$trace[] = $file;
}
return $trace;
return implode( ', ', array_reverse( $trace ) );
}

function _filter_trace( $trace ) {
Expand Down

0 comments on commit 3eaf53b

Please sign in to comment.