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 Notification Settings
* @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
* @since 23 Apr 2013
* @version SVN_VERSION_NUMBER
*/
@@ -150,12 +150,16 @@ class _notifications extends \IPS\Dispatcher\Controller
protected function settings()
{
\IPS\Dispatcher::i()->checkAcpPermission( 'profiles_manage' );
$form = new \IPS\Helpers\Form;
$form->addHeader('auto_follow_preferences');
$form->addMessage( 'auto_follow_update_all' );
$form->add( new \IPS\Helpers\Form\YesNo( 'auto_follow_new_content', \IPS\Settings::i()->auto_follow_new_content, FALSE, array(), NULL, NULL, NULL, 'auto_follow_new_content' ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'auto_follow_replied_to', \IPS\Settings::i()->auto_follow_replied_to, FALSE, array(), NULL, NULL, NULL, 'auto_follow_replied_to' ) );
$form->addHeader('notification_pruning');
$form->add( new \IPS\Helpers\Form\Number( 'subs_autoprune', \IPS\Settings::i()->subs_autoprune, FALSE, array(), NULL, \IPS\Member::loggedIn()->language()->addToStack('after'), \IPS\Member::loggedIn()->language()->addToStack('days') ) );
$form->add( new \IPS\Helpers\Form\Number( 'prune_notifications', \IPS\Settings::i()->prune_notifications, FALSE, array(), NULL, \IPS\Member::loggedIn()->language()->addToStack('after'), \IPS\Member::loggedIn()->language()->addToStack('months') ) );
if ( $values = $form->values() )
{
$form->saveAsSettings();
@@ -167,4 +171,22 @@ class _notifications extends \IPS\Dispatcher\Controller
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('notificationsettings');
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate('global')->block( 'notificationsettings', $form, FALSE );
}
/**
* Member Auto Follow Preferences
*
* @return void
*/
protected function updateMemberFollowPrefs()
{
\IPS\Dispatcher::i()->checkAcpPermission( 'profiles_manage' );
$autoTrack = json_encode( array(
'content' => \IPS\Settings::i()->auto_follow_new_content ? 1 : 0,
'comments' => \IPS\Settings::i()->auto_follow_replied_to ? 1 : 0,
'method' => 'immediate'
) );
\IPS\Db::i()->update( 'core_members', array( 'auto_track' => $autoTrack ) );
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=membersettings&controller=notifications' ), 'saved' );
}
}