BUGFIX Ensure that template path comments don't make it into ViewArchivedEmail

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@75919 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-05-04 02:37:53 +00:00 committed by Sam Minnee
parent 2414eb30cc
commit f2aa215cce

View File

@ -796,8 +796,11 @@ JS;
// encode the message to appear in the body of the email // encode the message to appear in the body of the email
$archiveURL = Director::absoluteBaseURL() . $record->URLSegment . '?archiveDate=' . $record->obj('LastEdited')->URLDatetime(); $archiveURL = Director::absoluteBaseURL() . $record->URLSegment . '?archiveDate=' . $record->obj('LastEdited')->URLDatetime();
$archiveEmailMessage = urlencode( $this->customise( array( 'ArchiveDate' => $record->obj('LastEdited'), 'ArchiveURL' => $archiveURL ) )->renderWith( 'ViewArchivedEmail' ) );
// Ensure that source file comments are disabled
SSViewer::set_source_file_comments(false);
$archiveEmailMessage = urlencode( $this->customise( array( 'ArchiveDate' => $record->obj('LastEdited'), 'ArchiveURL' => $archiveURL ) )->renderWith( 'ViewArchivedEmail' ) );
$archiveEmailMessage = preg_replace( '/\+/', '%20', $archiveEmailMessage ); $archiveEmailMessage = preg_replace( '/\+/', '%20', $archiveEmailMessage );
$fields->push( new HiddenField( 'ArchiveEmailMessage', '', $archiveEmailMessage ) ); $fields->push( new HiddenField( 'ArchiveEmailMessage', '', $archiveEmailMessage ) );