Permalink
Browse files

MINOR don't HTML-format queries from showqueries if this is an AJAX r…

…equest. (from r95855) (from r98097)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102589 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 453faed commit 1e20e55c687b4768e01aad1d8068466ae99261d9 @chillu chillu committed Apr 13, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 core/model/MySQLDatabase.php
@@ -127,7 +127,8 @@ public function query($sql, $errorLevel = E_USER_ERROR) {
if(isset($_REQUEST['showqueries'])) {
$endtime = round(microtime(true) - $starttime,4);
- Debug::message("\n$sql\n{$endtime}ms\n", false);
+ if (!isset($_REQUEST['ajax'])) Debug::message("\n$sql\n{$endtime}ms\n", false);
+ else echo "\n$sql\n{$endtime}ms\n";
}
if(!$handle && $errorLevel) $this->databaseError("Couldn't run query: $sql | " . mysql_error($this->dbConn), $errorLevel);

0 comments on commit 1e20e55

Please sign in to comment.