Skip to content
This repository
Browse code

Show the last 200 queries instead of the first 200.

Fixes #3273
  • Loading branch information...
commit 3e0fa0009bf91651ddebe9f08265095f9cfb31b3 1 parent 59f8402
Mark Story authored October 14, 2012

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. 12  lib/Cake/Model/Datasource/DboSource.php
12  lib/Cake/Model/Datasource/DboSource.php
@@ -921,14 +921,14 @@ public function logQuery($sql, $params = array()) {
921 921
 		$this->_queriesCnt++;
922 922
 		$this->_queriesTime += $this->took;
923 923
 		$this->_queriesLog[] = array(
924  
-			'query'		=> $sql,
925  
-			'params'	=> $params,
926  
-			'affected'	=> $this->affected,
927  
-			'numRows'	=> $this->numRows,
928  
-			'took'		=> $this->took
  924
+			'query' => $sql,
  925
+			'params' => $params,
  926
+			'affected' => $this->affected,
  927
+			'numRows' => $this->numRows,
  928
+			'took' => $this->took
929 929
 		);
930 930
 		if (count($this->_queriesLog) > $this->_queriesLogMax) {
931  
-			array_pop($this->_queriesLog);
  931
+			array_shift($this->_queriesLog);
932 932
 		}
933 933
 	}
934 934
 

0 notes on commit 3e0fa00

Please sign in to comment.
Something went wrong with that request. Please try again.