Ticket #6764: savequeries_check.diff

File savequeries_check.diff, 0.9 kB (added by filosofo, 6 months ago)
  • wp-includes/wp-db.php

    old new  
    1111define('ARRAY_A', 'ARRAY_A', false); 
    1212define('ARRAY_N', 'ARRAY_N', false); 
    1313 
    14 if (!defined('SAVEQUERIES')) 
    15         define('SAVEQUERIES', false); 
    16  
    1714class wpdb { 
    1815 
    1916        var $show_errors = false; 
     
    279276                $this->last_query = $query; 
    280277 
    281278                // Perform the query via std mysql_query function.. 
    282                 if (SAVEQUERIES
     279                if ( defined('SAVEQUERIES') && SAVEQUERIES
    283280                        $this->timer_start(); 
    284281 
    285282                $this->result = @mysql_query($query, $this->dbh); 
    286283                ++$this->num_queries; 
    287284 
    288                 if (SAVEQUERIES
     285                if ( defined('SAVEQUERIES') && SAVEQUERIES
    289286                        $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() ); 
    290287 
    291288                // If there is an error then take note of it..