Ticket #14859: wp-db.patch

File wp-db.patch, 711 bytes (added by sexytyranno, 3 years ago)

Performance logging action - patch

  • wp-db.php

    old new  
    11121112                $this->result = @mysql_query( $query, $dbh ); 
    11131113                $this->num_queries++; 
    11141114 
    1115                 if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) 
    1116                         $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() ); 
     1115                if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) { 
     1116                        $query_event = array( $query, $this->timer_stop(), $this->get_caller(), $this->time_start); 
     1117                        $this->queries[] = $query_event; 
     1118                        if(function_exists('do_action')) 
     1119                                do_action('query_done', $query_event); 
     1120                } 
    11171121 
    11181122                // If there is an error then take note of it.. 
    11191123                if ( $this->last_error = mysql_error( $dbh ) ) {