Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -76,7 +76,7 @@ class _Bulkmailer extends \IPS\Patterns\ActiveRecord
|
||||
*/
|
||||
public function send()
|
||||
{
|
||||
/* Work out how many to do */
|
||||
/* Work out how many to do */
|
||||
$classToUse = \IPS\Email::classToUse( \IPS\Email::TYPE_BULK );
|
||||
$limit = array( $this->offset, $classToUse::MAX_EMAILS_PER_GO );
|
||||
|
||||
@@ -123,7 +123,7 @@ class _Bulkmailer extends \IPS\Patterns\ActiveRecord
|
||||
}
|
||||
|
||||
/* Send it */
|
||||
$email = \IPS\Email::buildFromContent( $this->_data['subject'], $content, NULL, \IPS\Email::TYPE_BULK )
|
||||
$email = \IPS\Email::buildFromContent( $this->_data['subject'], \IPS\Email::staticParseTextForEmail( $content, \IPS\Lang::load( \IPS\Lang::defaultLanguage() ) ), NULL, \IPS\Email::TYPE_BULK )
|
||||
->setUnsubscribe( 'core', 'unsubscribeBulk' );
|
||||
$sent = 0;
|
||||
foreach ( $recipients as $languageId => $_recipients )
|
||||
@@ -187,9 +187,9 @@ class _Bulkmailer extends \IPS\Patterns\ActiveRecord
|
||||
}
|
||||
|
||||
/* Compile query */
|
||||
$select = ( $option !== static::GET_COUNT_ONLY ) ? 'core_members.member_id AS my_member_id, core_members.*' : 'COUNT(*)';
|
||||
$select = ( $option !== static::GET_COUNT_ONLY ) ? 'core_members.member_id AS my_member_id, core_members.*' : 'COUNT(DISTINCT member_id)';
|
||||
$limit = is_array( $option ) ? $option : NULL;
|
||||
$query = \IPS\Db::i()->select( $select, 'core_members', $where, ( $option !== static::GET_COUNT_ONLY ) ? 'core_members.member_id' : NULL, $limit );
|
||||
$query = \IPS\Db::i()->select( $select, 'core_members', $where, ( $option !== static::GET_COUNT_ONLY ) ? 'core_members.member_id' : NULL, $limit, NULL, NULL, \IPS\Db::SELECT_DISTINCT );
|
||||
|
||||
/* Run callbacks */
|
||||
foreach ( \IPS\Application::allExtensions( 'core', 'MemberFilter', FALSE, 'core' ) as $key => $extension )
|
||||
|
||||
Reference in new issue
Block a user