From 02b34515f37112c4e25bf8d2dc5a7ab8a66dd372 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Fri, 2 Dec 2011 16:26:23 +0000 Subject: [PATCH] Pass the current object to GetEditValue SVN:trunk[1704] --- core/attributedef.class.inc.php | 8 ++++---- core/dbobject.class.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index 71ced9cc2..01ccd0681 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -368,7 +368,7 @@ abstract class AttributeDefinition return array(); } - public function GetEditValue($sValue) + public function GetEditValue($sValue, $oHostObj = null) { return (string)$sValue; } @@ -1587,7 +1587,7 @@ class AttributeText extends AttributeString return "
".str_replace("\n", "
\n", $sValue).'
'; } - public function GetEditValue($sValue) + public function GetEditValue($sValue, $oHostObj = null) { if (preg_match_all(WIKI_OBJECT_REGEXP, $sValue, $aAllMatches, PREG_SET_ORDER)) { @@ -1692,7 +1692,7 @@ class AttributeCaseLog extends AttributeText return $value; } public function GetEditClass() {return "CaseLog";} - public function GetEditValue($sValue) { return ''; } // New 'edit' value is always blank since it will be appended to the existing log + public function GetEditValue($sValue, $oHostObj = null) { return ''; } // New 'edit' value is always blank since it will be appended to the existing log public function GetDefaultValue() {return new ormCaseLog();} public function Equals($val1, $val2) {return ($val1->GetText() == $val2->GetText());} @@ -2075,7 +2075,7 @@ class AttributeEnum extends AttributeString return "".parent::GetAsHtml($sLabel).""; } - public function GetEditValue($sValue) + public function GetEditValue($sValue, $oHostObj = null) { return $this->GetValueLabel($sValue); } diff --git a/core/dbobject.class.php b/core/dbobject.class.php index 8e7a2000a..a7469ba4a 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -520,7 +520,7 @@ abstract class DBObject } else { - $sEditValue = $oAtt->GetEditValue($this->Get($sAttCode)); + $sEditValue = $oAtt->GetEditValue($this->Get($sAttCode), $this); } return $sEditValue; }