From c5831b7849c15eccbf0f1724bb079b041f9ad0da Mon Sep 17 00:00:00 2001 From: colinmollenhour Date: Fri, 28 Dec 2012 14:13:25 -0500 Subject: [PATCH] Add print/log query flags. --- lib/Varien/Data/Collection/Db.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Varien/Data/Collection/Db.php b/lib/Varien/Data/Collection/Db.php index 5c891927438f6..ff3f6e9d78da8 100644 --- a/lib/Varien/Data/Collection/Db.php +++ b/lib/Varien/Data/Collection/Db.php @@ -690,11 +690,11 @@ public function loadData($printQuery = false, $logQuery = false) */ public function printLogQuery($printQuery = false, $logQuery = false, $sql = null) { - if ($printQuery) { + if ($printQuery || $this->getFlag('print_query')) { echo is_null($sql) ? $this->getSelect()->__toString() : $sql; } - if ($logQuery) { + if ($logQuery || $this->getFlag('log_query')) { Mage::log(is_null($sql) ? $this->getSelect()->__toString() : $sql); } return $this;