BUGFIX: Fix changing the URLSegment on a page making the Draft Site link

point to the wrong subsite (from r87776)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96781 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-01-12 23:53:43 +00:00
parent fdce9e045d
commit 7af4414a02

View File

@ -717,7 +717,7 @@ JS;
if( ($record->class != 'VirtualPage') && $originalURLSegment != $record->URLSegment) {
$message .= sprintf(_t('LeftAndMain.CHANGEDURL'," Changed URL to '%s'"),$record->URLSegment);
FormResponse::add("\$('Form_EditForm').elements.URLSegment.value = \"$record->URLSegment\";");
FormResponse::add("\$('Form_EditForm_StageURLSegment').value = \"{$record->URLSegment}\";");
FormResponse::add("\$('Form_EditForm_StageURLSegment').value = \"" . $record->AbsoluteLink() . "\";");
}
// If the 'Save & Publish' button was clicked, also publish the page