Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BUGFIX Removed switch in MySQLDatabase->query() to directly echo quer…

…ies with 'showqueries' parameter when request is called via ajax

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114782 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
commit ae2311bcd61b0a052032e265487f956508cf92c7 1 parent 43debfa
@chillu chillu authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  core/model/MySQLDatabase.php
View
3  core/model/MySQLDatabase.php
@@ -117,8 +117,7 @@ public function query($sql, $errorLevel = E_USER_ERROR) {
if(isset($_REQUEST['showqueries'])) {
$endtime = round(microtime(true) - $starttime,4);
- if (!isset($_REQUEST['ajax'])) Debug::message("\n$sql\n{$endtime}ms\n", false);
- else echo "\n$sql\n{$endtime}ms\n";
+ Debug::message("\n$sql\n{$endtime}ms\n", false);
}
if(!$handle && $errorLevel) $this->databaseError("Couldn't run query: $sql | " . mysql_error($this->dbConn), $errorLevel);
Please sign in to comment.
Something went wrong with that request. Please try again.