mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Hard code the migration task to use Content instead of the no-longer-used FieldName. This should probably be improved to iterate over all HTMLText fields on the model.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89460 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
7b8bdca931
commit
d2918f40ed
@ -31,10 +31,11 @@ class MigrateSiteTreeLinkingTask extends BuildTask {
|
||||
foreach($tracking as $link) {
|
||||
$linked = DataObject::get_by_id('SiteTree', $link['ChildID']);
|
||||
|
||||
$page->{$link['FieldName']} = preg_replace (
|
||||
// TOOD: Replace in all HTMLText fields
|
||||
$page->Content = preg_replace (
|
||||
"/href *= *([\"']?){$linked->URLSegment}\/?/i",
|
||||
"href=$1[sitetree_link id={$linked->ID}]",
|
||||
$page->{$link['FieldName']},
|
||||
$page->Content,
|
||||
-1,
|
||||
$replaced
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user