Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -49,22 +49,18 @@ class _email extends \IPS\Dispatcher\Controller
|
||||
$settingsForm->add( new \IPS\Helpers\Form\Email( 'email_in', \IPS\Settings::i()->email_in, TRUE ) );
|
||||
$settingsForm->add( new \IPS\Helpers\Form\Color( 'email_color', \IPS\Settings::i()->email_color, TRUE ) );
|
||||
$settingsForm->add( new \IPS\Helpers\Form\Upload( 'email_logo', \IPS\Settings::i()->email_logo ? \IPS\File::get( 'core_Theme', \IPS\Settings::i()->email_logo ) : NULL, FALSE, array( 'image' => TRUE, 'storageExtension' => 'core_Theme' ) ) );
|
||||
|
||||
$settingsForm->add( new \IPS\Helpers\Form\YesNo( 'social_links_in_email', \IPS\Settings::i()->social_links_in_email, FALSE, array(), NULL, NULL, NULL, 'social_links_in_email' ) );
|
||||
|
||||
if ( \IPS\Settings::i()->promote_community_enabled )
|
||||
{
|
||||
$settingsForm->add( new \IPS\Helpers\Form\YesNo( 'our_picks_in_email', \IPS\Settings::i()->our_picks_in_email, FALSE, array(), NULL, NULL, NULL, 'our_picks_in_email' ) );
|
||||
}
|
||||
|
||||
$settingsForm->addHeader( 'advanced_settings' );
|
||||
|
||||
$method = \IPS\Settings::i()->mail_method;
|
||||
$disabled = array();
|
||||
if ( \IPS\Settings::i()->sparkpost_api_key )
|
||||
{
|
||||
if ( \IPS\Settings::i()->sparkpost_use_for == 2 )
|
||||
{
|
||||
$method = 'sparkpost';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$disabled[] = 'sparkpost';
|
||||
}
|
||||
|
||||
if ( \IPS\Settings::i()->sendgrid_api_key )
|
||||
{
|
||||
if ( \IPS\Settings::i()->sendgrid_use_for == 2 )
|
||||
@@ -76,12 +72,18 @@ class _email extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$disabled[] = 'sendgrid';
|
||||
}
|
||||
|
||||
|
||||
/* We previously renamed this to 'php' */
|
||||
if( $method == 'mail' )
|
||||
{
|
||||
$method = 'php';
|
||||
}
|
||||
|
||||
$settingsForm->add( new \IPS\Helpers\Form\Radio( 'mail_method', $method, TRUE, array(
|
||||
'options' => array( 'php' => ( \IPS\CIC ? 'mail_method_cic' : 'mail_method_php' ), 'smtp' => 'mail_method_smtp', 'sendgrid' => 'mail_method_sendgrid', 'sparkpost' => 'mail_method_sparkpost' ),
|
||||
'options' => array( 'php' => ( \IPS\CIC ? 'mail_method_cic' : 'mail_method_php' ), 'smtp' => 'mail_method_smtp', 'sendgrid' => 'mail_method_sendgrid' ),
|
||||
'disabled' => $disabled,
|
||||
'toggles' => array(
|
||||
'mail' => array( 'php_mail_extra' ),
|
||||
'php' => array( 'php_mail_extra' ),
|
||||
'smtp' => array( 'smtp_host', 'smtp_port', 'smtp_user', 'smtp_pass', 'smtp_helo', 'smtp_protocol' ),
|
||||
)
|
||||
) ) );
|
||||
@@ -107,15 +109,6 @@ class _email extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
}
|
||||
|
||||
if ( $values['mail_method'] != 'sparkpost' and \IPS\Settings::i()->sparkpost_use_for == 2 )
|
||||
{
|
||||
$values['sparkpost_use_for'] = 1;
|
||||
}
|
||||
elseif ( $values['mail_method'] == 'sparkpost' )
|
||||
{
|
||||
$values['sparkpost_use_for'] = 2;
|
||||
}
|
||||
|
||||
if ( $values['mail_method'] != 'sendgrid' and \IPS\Settings::i()->sendgrid_use_for == 2 )
|
||||
{
|
||||
$values['sendgrid_use_for'] = 1;
|
||||
@@ -125,6 +118,11 @@ class _email extends \IPS\Dispatcher\Controller
|
||||
$values['sendgrid_use_for'] = 2;
|
||||
}
|
||||
|
||||
if ( $values['email_logo'] )
|
||||
{
|
||||
$values['email_logo'] = (string) $values['email_logo'];
|
||||
}
|
||||
|
||||
$settingsForm->saveAsSettings( $values );
|
||||
\IPS\Session::i()->log( 'acplogs__email_settings' );
|
||||
|
||||
@@ -239,7 +237,7 @@ class _email extends \IPS\Dispatcher\Controller
|
||||
$val = \IPS\Member::loggedIn()->language()->get('phpmail_not_sent');
|
||||
}
|
||||
|
||||
return \IPS\Theme::i()->getTemplate( 'logs' )->emailErrorLog( nl2br( htmlspecialchars( $val, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) ), $row );
|
||||
return \IPS\Theme::i()->getTemplate( 'logs' )->emailErrorLog( nl2br( htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE ) ), $row );
|
||||
},
|
||||
'mlog_content' => function( $val, $row )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user