Skip to content
Browse files

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

…ies with 'showqueries' parameter when request is called via ajax (from r114782)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114783 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 872e188 commit c639916afb1ca81ce37ba22db10f36b8d194fef4 @chillu chillu committed with sminnee
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);

0 comments on commit c639916

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