mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Avoid reloading CMS form twice after certain saving actions (fixes #5451, thanks muzdowski)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@113692 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c19aa2ce85
commit
e8e5c62c5a
@ -732,7 +732,8 @@ JS;
|
||||
// Removed virtualpage test as we need to draft/published links when url is changed
|
||||
if( (/*$record->class == 'VirtualPage' &&*/ $originalURLSegment != $record->URLSegment) ||
|
||||
($originalClass != $record->ClassName) || self::$ForceReload == true) {
|
||||
FormResponse::add("$('Form_EditForm').getPageFromServer($record->ID);");
|
||||
// avoid double loading by adding a uniqueness ID
|
||||
FormResponse::add($str = "$('Form_EditForm').getPageFromServer($record->ID);", $str);
|
||||
}
|
||||
|
||||
// After reloading action
|
||||
@ -765,7 +766,8 @@ JS;
|
||||
|
||||
// If there has been a change in the broken link values, reload the page
|
||||
if ($originalBrokenLinkValues != $record->HasBrokenLink.$record->HasBrokenFile) {
|
||||
FormResponse::add("$('Form_EditForm').getPageFromServer($record->ID);");
|
||||
// avoid double loading by adding a uniqueness ID
|
||||
FormResponse::add($str = "$('Form_EditForm').getPageFromServer($record->ID);", $str);
|
||||
}
|
||||
|
||||
// If the 'Save & Publish' button was clicked, also publish the page
|
||||
|
Loading…
Reference in New Issue
Block a user