mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
#177 - Don't let people create a page name the same as a class name
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@49186 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c2f1785ff6
commit
9b9cf01f48
@ -541,12 +541,6 @@ JS;
|
||||
FormResponse::add("$('Form_EditForm').getPageFromServer($record->ID);");
|
||||
}
|
||||
|
||||
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}\";");
|
||||
}
|
||||
|
||||
// After reloading action
|
||||
if($originalStatus != $record->Status) {
|
||||
$message .= sprintf(_t('LeftAndMain.STATUSTO'," Status changed to '%s'"),$record->Status);
|
||||
@ -554,6 +548,12 @@ JS;
|
||||
|
||||
$record->write();
|
||||
|
||||
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}\";");
|
||||
}
|
||||
|
||||
// If the 'Save & Publish' button was clicked, also publish the page
|
||||
if (isset($urlParams['publish']) && $urlParams['publish'] == 1) {
|
||||
$this->performPublish($record);
|
||||
|
Loading…
Reference in New Issue
Block a user