mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #2133 from jthomerson/pulls/fix_testcase_comments_setting
MINOR: fix Email class modifying SSViewer.source_file_comments config val
This commit is contained in:
commit
596934b107
@ -349,8 +349,9 @@ class Email extends ViewableData {
|
|||||||
* and it won't be plain email :)
|
* and it won't be plain email :)
|
||||||
*/
|
*/
|
||||||
protected function parseVariables($isPlain = false) {
|
protected function parseVariables($isPlain = false) {
|
||||||
|
$origState = Config::inst()->get('SSViewer', 'source_file_comments');
|
||||||
Config::inst()->update('SSViewer', 'source_file_comments', false);
|
Config::inst()->update('SSViewer', 'source_file_comments', false);
|
||||||
|
|
||||||
if(!$this->parseVariables_done) {
|
if(!$this->parseVariables_done) {
|
||||||
$this->parseVariables_done = true;
|
$this->parseVariables_done = true;
|
||||||
|
|
||||||
@ -373,6 +374,7 @@ class Email extends ViewableData {
|
|||||||
// Rewrite relative URLs
|
// Rewrite relative URLs
|
||||||
$this->body = HTTP::absoluteURLs($fullBody);
|
$this->body = HTTP::absoluteURLs($fullBody);
|
||||||
}
|
}
|
||||||
|
Config::inst()->update('SSViewer', 'source_file_comments', $origState);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user