mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
only very small things.
git-svn-id: file:///svn/phpbb/trunk@3967 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
c6888eb18e
commit
5b927b0162
3 changed files with 15 additions and 14 deletions
|
@ -23,6 +23,7 @@ class emailer
|
|||
{
|
||||
var $msg, $subject, $extra_headers;
|
||||
var $to_addres, $cc_address, $bcc_address;
|
||||
var $reply_to, $from;
|
||||
|
||||
var $tpl_msg = array();
|
||||
|
||||
|
@ -35,7 +36,7 @@ class emailer
|
|||
function reset()
|
||||
{
|
||||
$this->addresses = array();
|
||||
$this->vars = $this->msg = $this->extra_headers = $this->replyto = '';
|
||||
$this->vars = $this->msg = $this->extra_headers = $this->replyto = $this->from = '';
|
||||
}
|
||||
|
||||
// Sets an email address to send to
|
||||
|
@ -65,6 +66,11 @@ class emailer
|
|||
$this->replyto = trim($address);
|
||||
}
|
||||
|
||||
function from($address)
|
||||
{
|
||||
$this->from = trim($address);
|
||||
}
|
||||
|
||||
// set up subject for mail
|
||||
function subject($subject = '')
|
||||
{
|
||||
|
@ -169,12 +175,12 @@ class emailer
|
|||
|
||||
if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match))
|
||||
{
|
||||
$this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']);
|
||||
$this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($user->lang['ENCODING']);
|
||||
$drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->encoding = trim($lang['ENCODING']);
|
||||
$this->encoding = trim($user->lang['ENCODING']);
|
||||
}
|
||||
|
||||
if ($drop_header != '')
|
||||
|
@ -193,7 +199,7 @@ class emailer
|
|||
}
|
||||
|
||||
// Build header
|
||||
$this->extra_headers = (($this->replyto !='') ? "Reply-to: <$this->replyto>\r\n" : '') . "From: <" . $config['board_email'] . ">\r\nReturn-Path: <" . $config['board_email'] . ">\r\nMessage-ID: <" . md5(uniqid(time())) . "@" . $config['server_name'] . ">\r\nMIME-Version: 1.0\r\nContent-type: text/plain; charset=" . $this->encoding . "\r\nContent-transfer-encoding: 8bit\r\nDate: " . gmdate('D, d M Y H:i:s Z', time()) . "\r\nX-Priority: 3\r\nX-MSMail-Priority: Normal\r\nX-Mailer: PHP\r\n" . (($cc != '') ? "Cc:$cc\r\n" : '') . (($bcc != '') ? "Bcc:$bcc\r\n" : '') . trim($this->extra_headers);
|
||||
$this->extra_headers = (($this->replyto !='') ? "Reply-to: <$this->replyto>\r\n" : '') . (($this->from != '') ? "From: <$this->from>\r\n" : "From: <" . $config['board_email'] . ">\r\n") . "Return-Path: <" . $config['board_email'] . ">\r\nMessage-ID: <" . md5(uniqid(time())) . "@" . $config['server_name'] . ">\r\nMIME-Version: 1.0\r\nContent-type: text/plain; charset=" . $this->encoding . "\r\nContent-transfer-encoding: 8bit\r\nDate: " . gmdate('D, d M Y H:i:s Z', time()) . "\r\nX-Priority: 3\r\nX-MSMail-Priority: Normal\r\nX-Mailer: PHP\r\n" . (($cc != '') ? "Cc:$cc\r\n" : '') . (($bcc != '') ? "Bcc:$bcc\r\n" : '') . trim($this->extra_headers);
|
||||
|
||||
// Send message ... removed $this->encode() from subject for time being
|
||||
$result = ($config['smtp_delivery']) ? smtpmail($to, $this->subject, $this->msg, $this->extra_headers) : mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\r\n", $this->msg), $this->extra_headers);
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
<br /><span class="gensmall">{postrow.attachment.DOWNLOAD_NAME} - {postrow.attachment.L_DOWNLOADED_VIEWED} {postrow.attachment.L_DOWNLOAD_COUNT}</span><br /><br />
|
||||
<!-- ELSEIF postrow.attachment.IS_THUMBNAIL -->
|
||||
<span class="postbody">{postrow.attachment.COMMENT}<br />
|
||||
<a href="{postrow.attachment.U_DOWNLOAD_LINK}" target="_blank"><img src="{postrow.attachment.IMG_THUMB_SRC}" alt="{postrow.attachment.DOWNLOAD_NAME}" border="0" /></a></span>
|
||||
<a href="{postrow.attachment.U_DOWNLOAD_LINK}" target="_blank"><img src="{postrow.attachment.THUMB_IMG}" alt="{postrow.attachment.DOWNLOAD_NAME}" border="0" /></a></span>
|
||||
<br /><span class="gensmall">{postrow.attachment.DOWNLOAD_NAME} - {postrow.attachment.L_DOWNLOADED_VIEWED} {postrow.attachment.L_DOWNLOAD_COUNT}</span><br /><br />
|
||||
<!-- ELSE -->
|
||||
<span class="postbody">{postrow.attachment.COMMENT}</span><br />
|
||||
|
|
|
@ -1207,8 +1207,7 @@ foreach ($rowset as $key => $row)
|
|||
{
|
||||
case IMAGE_CAT:
|
||||
// Images
|
||||
// NOTE: If you want to use the download.php everytime an image is displayed inlined, replace the
|
||||
// Section between BEGIN and END with (Without the // of course):
|
||||
// NOTE: If you want to use the download.php everytime an image is displayed inlined, use this line:
|
||||
// $img_source = $phpbb_root_path . 'download.' . $phpEx . $SID . '&id=' . $attachment['attach_id'];
|
||||
if (!empty($config['ftp_upload']) && trim($config['upload_dir']) == '')
|
||||
{
|
||||
|
@ -1226,8 +1225,7 @@ foreach ($rowset as $key => $row)
|
|||
|
||||
case THUMB_CAT:
|
||||
// Images, but display Thumbnail
|
||||
// NOTE: If you want to use the download.php everytime an thumnmail is displayed inlined, replace the
|
||||
// Section between BEGIN and END with (Without the // of course):
|
||||
// NOTE: If you want to use the download.php everytime an thumnmail is displayed inlined, use this line:
|
||||
// $thumb_source = $phpbb_root_path . 'download.' . $phpEx . $SID . '&id=' . $attachment['attach_id'] . '&thumb=1';
|
||||
if (!empty($config['allow_ftp_upload']) && trim($config['upload_dir']) == '')
|
||||
{
|
||||
|
@ -1242,7 +1240,7 @@ foreach ($rowset as $key => $row)
|
|||
$download_link = $phpbb_root_path . "download.$phpEx$SID&id=" . $attachment['attach_id'];
|
||||
|
||||
$additional_array = array(
|
||||
'IMG_THUMB_SRC' => $thumb_source // should be THUMB_IMG or similar
|
||||
'THUMB_IMG' => $thumb_source
|
||||
);
|
||||
break;
|
||||
|
||||
|
@ -1282,10 +1280,7 @@ foreach ($rowset as $key => $row)
|
|||
);
|
||||
|
||||
// Viewed/Heared File ... update the download count (download.php is not called here)
|
||||
if (!preg_match("#&t=$topic_id#", $user->data['session_page']))
|
||||
{
|
||||
$update_count[] = $attachment['attach_id'];
|
||||
}
|
||||
$update_count[] = $attachment['attach_id'];
|
||||
break;
|
||||
*/
|
||||
default:
|
||||
|
|
Loading…
Add table
Reference in a new issue