Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+27 -3
View File
@@ -79,7 +79,9 @@ class _Group extends \IPS\Patterns\ActiveRecord
'gbw_post_highlight' => 1, // 1 means on, 0 means off
'gbw_hide_group' => 2, // Hide this group on the front end in search and similar areas: 1 is on, 0 is off
// 4 is deprecated (previously gbw_lock_unlock_own)
'gbw_promote' => 8 // Allow users in this group to promote to facebook/twitter
'gbw_promote' => 8, // Allow users in this group to promote to facebook/twitter
'gbw_immune_auto_mod' => 16, // Users in this group can not be auto moderated
'gbw_paid_clubs' => 32 // Users in this group can create paid clubs
)
)
);
@@ -183,6 +185,7 @@ class _Group extends \IPS\Patterns\ActiveRecord
public function __clone()
{
$oldId = $this->g_id;
$oldGroup = $this;
parent::__clone();
/* Rebuild permission indexes */
@@ -208,6 +211,16 @@ class _Group extends \IPS\Patterns\ActiveRecord
\IPS\Db::i()->update( 'core_permission_index', $index, array( 'perm_id = ?', $index['perm_id'] ) );
}
$extensions = \IPS\Application::allExtensions( 'core', 'GroupForm', FALSE, 'core', 'GroupSettings', TRUE );
/* Process each extension */
foreach ( $extensions as $class )
{
if( method_exists( $class, 'cloneGroup' ) )
{
$class->cloneGroup( $oldGroup, $this );
}
}
\IPS\Lang::saveCustom( 'core', "core_group_{$this->g_id}", iterator_to_array( \IPS\Db::i()->select( '*', 'core_sys_lang_words', array( 'word_key=?', "core_group_{$oldId}" ) )->setKeyField('lang_id')->setValueField('word_custom') ) );
/* Clear application and module store so that permissions are correctly rebuilt */
@@ -286,7 +299,7 @@ class _Group extends \IPS\Patterns\ActiveRecord
*/
public function formatName( $name )
{
return ( $this->prefix . htmlspecialchars( $name, \IPS\HTMLENTITIES | ENT_QUOTES, 'UTF-8', FALSE ) . $this->suffix );
return ( $this->prefix . htmlspecialchars( $name, ENT_DISALLOWED | ENT_QUOTES, 'UTF-8', FALSE ) . $this->suffix );
}
/**
@@ -340,6 +353,16 @@ class _Group extends \IPS\Patterns\ActiveRecord
$group->save();
}
}
$extensions = \IPS\Application::allExtensions( 'core', 'GroupForm', FALSE, 'core', 'GroupSettings', TRUE );
/* Process each extension */
foreach ( $extensions as $class )
{
if( method_exists( $class, 'delete' ) )
{
$class->delete( $this );
}
}
parent::delete();
\IPS\Lang::deleteCustom( 'core', 'core_group_' . $this->g_id );
@@ -355,12 +378,13 @@ class _Group extends \IPS\Patterns\ActiveRecord
/**
* Get output for API
*
* @param \IPS\Member|NULL $authorizedMember The member making the API request or NULL for API Key / client_credentials
* @return array
* @apiresponse int id ID number
* @apiresponse string name Name
* @apiresponse string formattedName Name with formatting
*/
public function apiOutput()
public function apiOutput( \IPS\Member $authorizedMember = NULL )
{
return array(
'id' => $this->g_id,