Version 4.7.0

This commit is contained in:
Neo committed 2025-12-19 16:00:35 -08:00
1 parent 517a5e1f70
commit 8ba7d43898
1933 files changed
+65613 -11332

No files matched your search

@@ -182,7 +182,7 @@ class _notifications extends \IPS\Dispatcher\Controller
$form->addMessage( $option['description'] );
}
if ( !\in_array( 'inline', $option['disabled'] ) or ( ( \IPS\Settings::i()->mobile_app_id || \IPS\Notification::webPushEnabled() ) and !\in_array( 'push', $option['disabled'] ) ) or !\in_array( 'email', $option['disabled'] ) )
if ( !\in_array( 'inline', $option['disabled'] ) or ( \IPS\Notification::webPushEnabled() and !\in_array( 'push', $option['disabled'] ) ) or !\in_array( 'email', $option['disabled'] ) )
{
$canEditField = new \IPS\Helpers\Form\YesNo( 'notificationsettings_editable_' . $key, $defaultConfiguration[ $key ]['editable'], FALSE, array(
'togglesOn' => array( "member_notifications_{$key}_inline_editable", "member_notifications_{$key}_push", "member_notifications_{$key}_email_editable" ),
@@ -281,7 +281,7 @@ class _notifications extends \IPS\Dispatcher\Controller
}
}
if ( !\in_array( 'inline', $option['disabled'] ) or ( ( \IPS\Settings::i()->mobile_app_id || \IPS\Notification::webPushEnabled() ) and !\in_array( 'push', $option['disabled'] ) ) or !\in_array( 'email', $option['disabled'] ) )
if ( !\in_array( 'inline', $option['disabled'] ) or ( \IPS\Notification::webPushEnabled()and !\in_array( 'push', $option['disabled'] ) ) or !\in_array( 'email', $option['disabled'] ) )
{
$row = array(
'notification_key' => $key,
@@ -296,7 +296,7 @@ class _notifications extends \IPS\Dispatcher\Controller
{
if ( $k === 'push' )
{
if ( !\IPS\Settings::i()->mobile_app_id && !\IPS\Notification::webPushEnabled() )
if ( !\IPS\Notification::webPushEnabled() )
{
continue;
}
@@ -373,9 +373,6 @@ class _notifications extends \IPS\Dispatcher\Controller
$extension->resetExtra();
}
}
/* Sounds is special */
\IPS\Db::i()->update( 'core_members', 'members_bitoptions2 = members_bitoptions2 ' . ( !\IPS\Settings::i()->notification_prefs_sound ? '|' : '&~' ) . \IPS\Member::$bitOptions['members_bitoptions']['members_bitoptions2']['disable_notification_sounds'] );
/* Log and redirect */
\IPS\Session::i()->log( 'acplog__notification_settings_existing' );
@@ -74,22 +74,33 @@ class _profilesettings extends \IPS\Dispatcher\Controller
throw new \DomainException('user_name_length_no_match');
}
} ) );
$form->add( new \IPS\Helpers\Form\Custom( 'username_characters', \IPS\Settings::i()->username_characters, FALSE, array(
'getHtml' => function( $field ) {
$easy = NULL;
if ( preg_match( '/^\/\^\(\(\[(\\\p\{L\}\\\p\{M\}|A\-Za\-z)(\\\p\{N\}|0-9)?(.+)?\]\+\)( )?\?\)\+\$\/u$/', $field->value, $matches ) )
if ( \is_array( $field->value ) )
{
$easy['letters'] = ( $matches[1] == '\\p{L}\\p{M}' ) ? 'all' : 'latin';
if ( $matches[2] )
$easy['letters'] = $field->value['letters'];
$easy['numbers'] = $field->value['numbers'];
$easy['spaces'] = (bool) isset( $field->value['spaces'] );
$easy['extra'] = isset( $field->value['extra_enabled'] ) ? $field->value['extra'] : '';
$field->value = $field->value['regex'];
}
else{
if ( preg_match( '/^\/\^\(\(\[(\\\p\{L\}\\\p\{M\}|A\-Za\-z)(\\\p\{N\}|0-9)?(.+)?\]\+\)( )?\?\)\+\$\/u$/', $field->value, $matches ) )
{
$easy['numbers'] = ( $matches[2] == '\\p{N}' ) ? 'all' : 'arabic';
$easy['letters'] = ( $matches[1] == '\\p{L}\\p{M}' ) ? 'all' : 'latin';
if ( $matches[2] )
{
$easy['numbers'] = ( $matches[2] == '\\p{N}' ) ? 'all' : 'arabic';
}
else
{
$easy['numbers'] = 'none';
}
$easy['spaces'] = (bool) isset( $matches[4] );
$easy['extra'] = stripslashes( $matches[3] );
}
else
{
$easy['numbers'] = 'none';
}
$easy['spaces'] = (bool) isset( $matches[4] );
$easy['extra'] = stripslashes( $matches[3] );
}
return \IPS\Theme::i()->getTemplate('members')->usernameRegexSetting( $field->name, $field->value, $easy );
}
@@ -366,7 +366,7 @@ class _reputation extends \IPS\Node\Controller
\IPS\Lang::deleteCustom( 'core', 'core_reputation_level_' . \IPS\Request::i()->id );
}
catch ( \UnderflowExceptiobn $e ) { }
catch ( \UnderflowException $e ) { }
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=membersettings&controller=reputation&tab=levels' ) );
}