Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

@@ -2,9 +2,9 @@
/**
* @brief Incoming Email Setup
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @subpackage Nexus
* @since 16 Apr 2014
* @version SVN_VERSION_NUMBER
@@ -93,6 +93,10 @@ class _incomingemail extends \IPS\Dispatcher\Controller
{
$content = \IPS\Theme::i()->getTemplate('incomingemailsetup')->pop3( $this->_pop3() );
}
elseif ( \IPS\Request::i()->type === 'sendgrid' )
{
$content = \IPS\Theme::i()->getTemplate('incomingemailsetup')->sendgrid();
}
else
{
$content = \IPS\Theme::i()->getTemplate('incomingemailsetup')->splash( (string) $table );
@@ -127,8 +131,15 @@ class _incomingemail extends \IPS\Dispatcher\Controller
*/
protected function disablePop3()
{
foreach ( array( 'pop3_server', 'pop3_port', 'pop3_user', 'pop3_password' ) as $k )
{
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => '' ), array( 'conf_key=?', $k ) );
\IPS\Settings::i()->$k = '';
}
unset( \IPS\Data\Store::i()->settings );
\IPS\Session::i()->log( 'acplogs__pop3_settings' );
\IPS\DB::i()->update( 'core_tasks', array( 'enabled' => 0 ), array( 'app=? AND `key`=?', 'core', 'pop' ) );
\IPS\Db::i()->update( 'core_tasks', array( 'enabled' => 0 ), array( 'app=? AND `key`=?', 'core', 'pop' ) );
\IPS\Output::i()->redirect( \IPS\Http\Url::internal('app=nexus&module=support&controller=settings&tab=incomingemail') );
}
@@ -148,28 +159,20 @@ class _incomingemail extends \IPS\Dispatcher\Controller
if ( $values = $form->values() )
{
require_once \IPS\ROOT_PATH . '/system/3rd_party/pop3/pop3.class.inc';
$pop3 = new \POP3;
try
{
if ( !$pop3->connect( ( $values['pop3_tls'] ? 'ssl://' : '' ) . $values['pop3_server'], $values['pop3_port'] ) )
{
throw new \DomainException( \IPS\Member::loggedIn()->language()->addToStack('pop3_connect_err') );
}
if ( !$pop3->login( $values['pop3_user'], $values['pop3_password'] ) )
{
throw new \DomainException( \IPS\Member::loggedIn()->language()->addToStack('pop3_login_err') );
}
$pop3 = new \IPS\Email\Incoming\PopImap( $values['pop3_server'], $values['pop3_tls'], $values['pop3_port'], $values['pop3_user'], $values['pop3_password'] );
$form->saveAsSettings();
\IPS\Session::i()->log( 'acplogs__pop3_settings' );
\IPS\DB::i()->update( 'core_tasks', array( 'enabled' => 1 ), array( 'app=? AND `key`=?', 'core', 'pop' ) );
\IPS\Db::i()->update( 'core_tasks', array( 'enabled' => 1 ), array( 'app=? AND `key`=?', 'core', 'pop' ) );
\IPS\Output::i()->redirect( \IPS\Http\Url::internal('app=nexus&module=support&controller=settings&tab=incomingemail') );
}
catch ( \Exception $e )
catch ( \IPS\Email\Incoming\PopImapException $e )
{
$form->error = $e->getMessage();
$form->error = \IPS\Member::loggedIn()->language()->addToStack( $e->getMessage() );
}
}
@@ -242,7 +245,10 @@ class _incomingemail extends \IPS\Dispatcher\Controller
* @return void
*/
protected function incomingEmailDelete()
{
{
/* Make sure the user confirmed the deletion */
\IPS\Request::i()->confirmedDelete();
\IPS\Db::i()->delete( 'core_incoming_emails', array( 'rule_id=?', \IPS\Request::i()->id ) );
\IPS\Session::i()->log( 'acplogs__incomingemail_deleted' );