Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
+15
-6
@@ -278,7 +278,7 @@ abstract class _Email
|
||||
|
||||
/* Get our picks */
|
||||
$ourPicks = NULL;
|
||||
if( \IPS\Settings::i()->our_picks_in_email and $this->type !== 'transactional' )
|
||||
if( \IPS\Settings::i()->promote_community_enabled and \IPS\Settings::i()->our_picks_in_email and $this->type !== 'transactional' )
|
||||
{
|
||||
$ourPicks = \IPS\core\Promote::internalStream( 4 );
|
||||
}
|
||||
@@ -291,7 +291,7 @@ abstract class _Email
|
||||
$language->parseEmail( $return );
|
||||
|
||||
/* Parse URLs */
|
||||
$this->parseFileObjectUrls( $return );
|
||||
static::parseFileObjectUrls( $return );
|
||||
|
||||
/* Return */
|
||||
return $return;
|
||||
@@ -324,7 +324,7 @@ abstract class _Email
|
||||
|
||||
/* Using a template */
|
||||
elseif ( $this->templateApp )
|
||||
{
|
||||
{
|
||||
$return = trim( static::devProcessTemplate( "email__{$this->templateApp}_{$this->templateKey}_subject_" . str_replace( array( ' ', '.', '-', '@' ), '_', $language->short ), $language->get( "mailsub__{$this->templateApp}_{$this->templateKey}" ), array_merge( $this->templateParams, array( $this ) ) ) );
|
||||
}
|
||||
|
||||
@@ -543,7 +543,7 @@ abstract class _Email
|
||||
'mlog_subject' => $subject,
|
||||
'mlog_content' => $html ?: $plaintext,
|
||||
'mlog_resend_data' => json_encode( array( 'type' => $this->type, 'headers' => $this->_compileHeaders( $subject, $to, $cc, $bcc, $fromEmail, $fromName, $additionalHeaders, $boundary ), 'body' => array( 'html' => $html, 'plain' => $plaintext ), 'boundary' => $boundary ) ),
|
||||
'mlog_msg' => $e->getMessage(),
|
||||
'mlog_msg' => json_encode( array( 'message' => $e->getMessage(), 'details' => $e->extraDetails ) ),
|
||||
'mlog_smtp_log' => $this->getLog(),
|
||||
) );
|
||||
|
||||
@@ -597,6 +597,10 @@ abstract class _Email
|
||||
public function mergeAndSend( $recipients, $fromEmail = NULL, $fromName = NULL, $additionalHeaders = array(), \IPS\Lang $language )
|
||||
{
|
||||
$return = 0;
|
||||
|
||||
/* Get the current locale, and then set the language's locale so datetime formatting in templates is correct for this language */
|
||||
$currentLocale = setlocale( LC_ALL, '0' );
|
||||
$language->setLocale();
|
||||
|
||||
foreach ( $recipients as $address => $vars )
|
||||
{
|
||||
@@ -625,6 +629,9 @@ abstract class _Email
|
||||
$return++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Now restore the locale we started with */
|
||||
\IPS\Lang::restoreLocale( $currentLocale );
|
||||
|
||||
return $return;
|
||||
}
|
||||
@@ -1211,14 +1218,16 @@ abstract class _Email
|
||||
* Makes HTML acceptable for use in emails: Image
|
||||
*
|
||||
* @param \DOMElement $node The element
|
||||
* @param \DOMElement $parent The element's parent node
|
||||
* @param \DOMNode $parent The element's parent node
|
||||
* @param \IPS\Lang $language Language
|
||||
* @return string
|
||||
*/
|
||||
protected static function _parseElementForEmailImage( \DOMElement &$node, \DOMNode $parent, \IPS\Lang $language )
|
||||
{
|
||||
$maxImageDims = \IPS\Settings::i()->attachment_image_size ? explode( 'x', \IPS\Settings::i()->attachment_image_size ) : array( 1000, 750 );
|
||||
$node->setAttribute( 'style', "max-width:{$maxImageDims[0]}px;max-height:{$maxImageDims[1]}px;" );
|
||||
|
||||
/* Set the max image height and width */
|
||||
$node->setAttribute( 'style', "max-width:{$maxImageDims[0]}px;max-height:{$maxImageDims[1]}px;" . $node->getAttribute('style') ) ;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user