added params to profiling token, on paramlogging #1058

Merged
merged 2 commits into from Jul 29, 2012
View
1 CHANGELOG
@@ -36,6 +36,7 @@ Version 1.1.11 work in progress
- Bug #865: CLogRoute called processLogs() even if log array was empty and caused empty emails and log files (cebe)
- Bug #879: Fixed a possible PHP error caused by CWebUser::restoreFromCookie() in combination with CHttpRequest.enableCookieValidation (kidol)
- Bug #901: Fixed possible encoding problem on exception (mdomba, samdark, cebe)
+- Bug #1000: Added params to profiling token in CDbCommand::execute() to be consitent with CDbCommand::queryInternal() (cebe)
- Bug #1045: Building a query with empty array as parameter will not result in a broken sql-string anymore(suralc)
- Bug: Fixed CMenu::isItemActive() to work properly when there is a hash in the item's url (SlKelevro)
- Bug: Added missing return statement to CAuthItem->revoke() (mdomba)
View
6 framework/db/CDbCommand.php
@@ -327,7 +327,7 @@ public function execute($params=array())
try
{
if($this->_connection->enableProfiling)
- Yii::beginProfile('system.db.CDbCommand.execute('.$this->getText().')','system.db.CDbCommand.execute');
+ Yii::beginProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
$this->prepare();
if($params===array())
@@ -337,14 +337,14 @@ public function execute($params=array())
$n=$this->_statement->rowCount();
if($this->_connection->enableProfiling)
- Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().')','system.db.CDbCommand.execute');
+ Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
return $n;
}
catch(Exception $e)
{
if($this->_connection->enableProfiling)
- Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().')','system.db.CDbCommand.execute');
+ Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
$errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
$message = $e->getMessage();
Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',