diff --git a/module/mail/model.php b/module/mail/model.php index 4e7e715ae4..26686a4a1a 100644 --- a/module/mail/model.php +++ b/module/mail/model.php @@ -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);