Replace constant DEBUG to use in Config. Remove start profiler from FrontController (moved to bootstrap).
This commit is contained in:
@ -138,7 +138,7 @@ class MongoStatement extends DbStatement
|
||||
$this->result = false;
|
||||
$mongo = $this->driver->getConnection();
|
||||
if ($mongo instanceof Mongo) {
|
||||
if (DEBUG) {
|
||||
if (Config::get('PROFILER_DETAILS')) {
|
||||
$profiler = Profiler::getInstance()->profilerCommand('Mongo', $request);
|
||||
$result = $request->execute();
|
||||
$profiler->end();
|
||||
|
@ -157,7 +157,7 @@ class MySQLiStatement extends DbStatement
|
||||
* @var MySQLi
|
||||
*/
|
||||
$mysqli = $this->driver->getConnection();
|
||||
if (DEBUG) {
|
||||
if (Config::get('PROFILER_DETAILS')) {
|
||||
$profiler = Profiler::getInstance()->profilerCommand('MySQL', $request);
|
||||
$result = $mysqli->query($request);
|
||||
$profiler->end();
|
||||
|
Reference in New Issue
Block a user