Skip to content

Commit

Permalink
BUGFIX Removed switch in MySQLDatabase->query() to directly echo quer…
Browse files Browse the repository at this point in the history
…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
chillu committed Dec 9, 2010
1 parent 43debfa commit ae2311b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/model/MySQLDatabase.php
Expand Up @@ -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);
Expand Down

0 comments on commit ae2311b

Please sign in to comment.