Zeile 113 | Zeile 113 |
---|
public $code = 0;
/**
|
public $code = 0;
/**
|
* Selects between AdminEmail and ReturnEmail, dependant on if ReturnEmail is filled. * * @return string */ function get_from_email()
| * Returns the appropriate email address based on the type. * * @param string $type The type of email address to return. * @return string The selected email address. */ function get_email($type='from')
|
{ global $mybb;
|
{ global $mybb;
|
if(trim($mybb->settings['returnemail'])) { $email = $mybb->settings['returnemail']; } else
| if($type === 'reply-to')
|
{
|
{
|
$email = $mybb->settings['adminemail'];
| if(isset($mybb->settings['returnemail']) && trim($mybb->settings['returnemail'])) { return $mybb->settings['returnemail']; }
|
}
|
}
|
return $email; }
| // Fallback or 'from' case return $mybb->settings['adminemail']; }
|
/** * Builds the whole mail.
| /** * Builds the whole mail.
|
Zeile 157 | Zeile 158 |
---|
if($from) { $this->from = $from;
|
if($from) { $this->from = $from;
|
| $this->from_named = $this->from;
|
} else {
|
} else {
|
$this->from = $this->get_from_email();
| $this->from = $this->get_email('from');
|
$this->from_named = '"'.$this->utf8_encode($mybb->settings['bbname']).'"'; $this->from_named .= " <".$this->from.">"; }
| $this->from_named = '"'.$this->utf8_encode($mybb->settings['bbname']).'"'; $this->from_named .= " <".$this->from.">"; }
|
Zeile 171 | Zeile 173 |
---|
} else {
|
} else {
|
$this->return_email = ""; $this->return_email = $this->get_from_email();
| $this->return_email = $this->get_email('reply-to');
|
}
$this->set_to($to);
| }
$this->set_to($to);
|
Zeile 420 | Zeile 421 |
---|
{ $newpos = min($pos + $chunk_size, $len);
|
{ $newpos = min($pos + $chunk_size, $len);
|
while(ord($string[$newpos]) >= 0x80 && ord($string[$newpos]) < 0xC0)
| if($newpos != $len)
|
{
|
{
|
// Reduce len until it's safe to split UTF-8. $newpos--;
| while(ord($string[$newpos]) >= 0x80 && ord($string[$newpos]) < 0xC0) { // Reduce len until it's safe to split UTF-8. $newpos--; }
|
}
$chunk = substr($string, $pos, $newpos - $pos);
| }
$chunk = substr($string, $pos, $newpos - $pos);
|