Version 4.6.0

This commit is contained in:
Neo committed 2025-12-19 05:55:31 -08:00
1 parent f79dcf067a
commit 517a5e1f70
2036 files changed
+110041 -26162

No files matched your search

@@ -230,7 +230,7 @@ class _Service extends \IPS\Node\Model
public function form( &$form )
{
$form->add( new \IPS\Helpers\Form\Text( 'share_title', $this->title, TRUE ) );
$form->add( new \IPS\Helpers\Form\Select( 'share_groups', ( $this->groups != '*' ) ? explode( ",", $this->groups ) : $this->groups, FALSE, array( 'options' => \IPS\Member\Group::groups(), 'parse' => 'normal', 'multiple' => TRUE, 'unlimited' => '*', 'unlimitedLang' => 'everyone' ) ) );
$form->add( new \IPS\Helpers\Form\CheckboxSet( 'share_groups', ( $this->groups != '*' ) ? explode( ",", $this->groups ) : $this->groups, FALSE, array( 'options' => \IPS\Member\Group::groups(), 'parse' => 'normal', 'multiple' => TRUE, 'unlimited' => '*', 'unlimitedLang' => 'everyone', 'impliedUnlimited' => TRUE ) ) );
/* Find the service and see if it has any additional settings... */
$services = \IPS\Content\ShareServices::services();
@@ -254,13 +254,19 @@ class _Service extends \IPS\Node\Model
$values['share_autoshare'] = $values[ 'share_autoshare_' . ucwords( $this->key ) ];
unset( $values[ 'share_autoshare_' . ucwords( $this->key ) ] );
$loginHandlers = \IPS\Login::handlers(TRUE);
if ( isset( $loginHandlers[ ucwords( $this->key ) ] ) )
$loginHandlers = \IPS\Login::getStore();
foreach( $loginHandlers as $handler )
{
$settings = $loginHandlers[ ucwords( $this->key ) ]->settings;
$settings['autoshare'] = $values['share_autoshare'];
$loginHandlers[ ucwords( $this->key ) ]->settings = json_encode( $settings );
$loginHandlers[ ucwords( $this->key ) ]->save();
$_key = mb_substr( \get_class( $handler ), 10 );
if ( $_key == ucwords( $this->key ) )
{
$settings = $handler->settings;
$settings['autoshare'] = $values['share_autoshare'];
$handler->settings = json_encode( $settings );
$handler->save();
}
}
}