BUGFIX: #3204 - Broken link tracking is broken (ajshort)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@67605 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2008-12-07 22:05:00 +00:00 committed by Sam Minnee
parent 31a90edd9a
commit bc1235be3f

View File

@ -154,7 +154,7 @@ class HtmlEditorField extends TextareaField {
$fieldName = $this->name;
if($record->ID && $record->hasMethod('LinkTracking') && $linkTracking = $record->LinkTracking()) {
$linkTracking->removeByFilter("FieldName = '$fieldName'");
$linkTracking->removeByFilter("\"FieldName\" = '$fieldName' AND \"SiteTreeID\" = $record->ID");
if(isset($linkedPages)) foreach($linkedPages as $item) {
$linkTracking->add($item, array("FieldName" => $fieldName));
@ -570,4 +570,4 @@ class HtmlEditorField_dropdown extends HtmlEditorField_control {
class HtmlEditorField_break extends HtmlEditorField_control {
}
?>
?>