Version 4.7.6

This commit is contained in:
Neo committed 2025-12-19 16:05:19 -08:00
1 parent 8ba7d43898
commit 7b7404e741
1085 files changed
+30590 -7837

No files matched your search

+9 -2
View File
@@ -484,12 +484,19 @@ abstract class _Email
*/
protected static function _parseElementForClickTracking( $element, $templateKey=NULL )
{
/* Ignore any links that are mailto links */
$href = (string)$element->getAttribute( 'href' );
if( \str_starts_with( $href, 'mailto' ) )
{
return;
}
/* If we are working with mergeAndSend() this may not be a full URL (which may be passed as a user param)
so we need to ignore any exceptions and simply not adjust the link, which should be done manually instead */
try
{
$url = \IPS\Http\Url::internal( "app=core&module=system&controller=redirect", 'front' )->setQueryString( array(
'url' => (string) $element->getAttribute('href'),
'url' => $href,
'resource' => ( \IPS\Request::i()->resource ) ? 1 : NULL,
'key' => hash_hmac( "sha256", (string) $element->getAttribute('href'), \IPS\Settings::i()->site_secret_key . 'r' ),
'email' => 1,
@@ -760,7 +767,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' => json_encode( array( 'message' => $e->getMessage(), 'details' => $e->extraDetails ) ),
'mlog_msg' => json_encode( array( 'message' => $e->messageKey, 'details' => $e->extraDetails ) ),
'mlog_smtp_log' => $this->getLog(),
'mlog_notification_sent' => FALSE
) );
+9 -9
View File
@@ -713,19 +713,19 @@ class _Email
switch ( $row['rule_criteria_field'] )
{
case 'to':
$analyse = implode( ',', $this->to );
$analyze = implode( ',', $this->to );
break;
case 'from':
$analyse = $this->from;
$analyze = $this->from;
break;
case 'sbjt':
$analyse = $this->subject;
$analyze = $this->subject;
break;
case 'body':
$analyse = $this->message;
$analyze = $this->message;
break;
}
@@ -733,22 +733,22 @@ class _Email
switch ( $row['rule_criteria_type'] )
{
case 'ctns':
$match = (bool) ( mb_strpos( $analyse, $row['rule_criteria_value'] ) !== FALSE );
$match = (bool) ( mb_strpos( $analyze, $row['rule_criteria_value'] ) !== FALSE );
break;
case 'eqls':
if ( mb_strpos( $analyse, ',' ) !== FALSE )
if ( mb_strpos( $analyze, ',' ) !== FALSE )
{
$match = (bool) \in_array( $analyse, explode( ',', $analyse ) );
$match = (bool) \in_array( $analyze, explode( ',', $analyze ) );
}
else
{
$match = (bool) ( $analyse == $row['rule_criteria_value'] );
$match = (bool) ( $analyze == $row['rule_criteria_value'] );
}
break;
case 'regx':
$match = (bool) ( preg_match( "/{$row['rule_criteria_value']}/", $analyse ) == 1 );
$match = (bool) ( preg_match( "/{$row['rule_criteria_value']}/", $analyze ) == 1 );
break;
}
+3 -1
View File
@@ -26,6 +26,7 @@ class _Exception extends \RuntimeException
* @brief Extra details for log
*/
public $extraDetails = array();
public $messageKey = NULL;
/**
* Constructor
@@ -40,6 +41,7 @@ class _Exception extends \RuntimeException
{
/* Store these for the extraLogData() method */
$this->extraDetails = $extra;
$this->messageKey = $message;
switch ( $code )
{
@@ -47,7 +49,7 @@ class _Exception extends \RuntimeException
$message = \IPS\Member::loggedIn()->language()->addToStack( $message, FALSE, array( 'sprintf' => $extra ) );
break;
}
return parent::__construct( $message, $code, $previous );
}
}