#17198458 메일발송시 XE의 첨부파일에 대해서 절대경로로 내용을 수정하도록 하여 문제 해결

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6327 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-05-18 07:53:43 +00:00
parent 05aa63b41b
commit 630de24f7b

View file

@ -45,9 +45,14 @@
}
function setContent($content) {
$content = preg_replace_callback('/<img([^>]+)>/i',array($this,'replaceResourceRealPath'), $content);
$this->content = $content;
}
function replaceResourceRealPath($matches) {
return preg_replace('/src=(["\']?)files/i','src=$1'.Context::getRequestUri().'files', $matches[0]);
}
function getPlainContent() {
return chunk_split(base64_encode(str_replace(array("<",">","&"), array("&lt;","&gt;","&amp;"), $this->content)));
}