* finish task #6878.

This commit is contained in:
wangyidong
2020-02-11 16:14:11 +08:00
parent e993b98b6f
commit d433403d31
+1 -3
View File
@@ -304,11 +304,9 @@ class mailModel extends model
$this->clear();
/* Replace full webPath image for mail. */
$isonlybody = isonlybody();
unset($_GET['onlybody']);
$sysURL = zget($this->config->mail, 'domain', common::getSysURL());
$readLinkReg = str_replace(array('%fileID%', '/', '.', '?'), array('[0-9]+', '\/', '\.', '\?'), helper::createLink('file', 'read', 'fileID=(%fileID%)', '\w+'));
if($isonlybody) $_GET['onlybody'] = 'yes';
if(isonlybody()) $readLinkReg = str_replace(array('\?onlybody=yes', '&onlybody=yes'), '', $readLinkReg);
$body = preg_replace('/ src="(' . $readLinkReg . ')" /', ' src="' . $sysURL . '$1" ', $body);
$body = preg_replace('/ src="{([0-9]+)(\.(\w+))?}" /', ' src="' . $sysURL . helper::createLink('file', 'read', "fileID=$1", "$3") . '" ', $body);