Skip to content

Commit

Permalink
Mark as 2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Apr 10, 2012
1 parent 8fe1850 commit e14b7d9
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 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.1
Version: 2.2.2
Author: John Blackbourn
Author URI: http://lud.icro.us/
Text Domain: query-monitor
Expand Down Expand Up @@ -335,6 +335,26 @@ protected function _sort( $a, $b ) {
return ( $a['ltime'] > $b['ltime'] ) ? -1 : 1;
}

protected function convert_hr_to_bytes( $size ) {

# Annoyingly, wp_convert_hr_to_bytes() is defined in a file that's only
# loaded in the admin area, so we'll use our own version.
# See http://core.trac.wordpress.org/ticket/17725

$bytes = (float) $size;

if ( $bytes ) {
$last = strtolower( substr( $size, -1 ) );
$pos = strpos( ' kmg', $last, 1);
if ( $pos )
$bytes *= pow( 1024, $pos );
$bytes = round( $bytes );
}

return $bytes;

}

public function id() {
return "qm-{$this->id}";
}
Expand Down

0 comments on commit e14b7d9

Please sign in to comment.