浏览代码

Fix titles in custom log items (LogableBehavior).

Currently, any title set will not carry through due to the wrong variable being used.
Hanson Wong 11 年之前
父节点
当前提交
41c4e42e08
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Model/Behavior/LogableBehavior.php

+ 3 - 3
Model/Behavior/LogableBehavior.php

@@ -312,7 +312,7 @@ class LogableBehavior extends ModelBehavior {
 	 * @param Model $Model
 	 * @param string $action name of action that is taking place (dont use the crud ones)
 	 * @param int $id id of the logged item (ie foreign_id in logs table)
-	 * @param array $values optional other values for your logs table
+	 * @param array $logData optional other values for your logs table
 	 * @return mixed Success
 	 */
 	public function customLog(Model $Model, $action, $id = null, $logData = array()) {
@@ -323,8 +323,8 @@ class LogableBehavior extends ModelBehavior {
 			$logData[$this->settings[$Model->alias]['foreignKey']] = $id;
 		}
 		$title = null;
-		if (isset($values['title'])) {
-			$title = $values['title'];
+		if (isset($logData['title'])) {
+			$title = $logData['title'];
 			unset($logData['title']);
 		}
 		$logData['action'] = $action;