Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -238,6 +238,9 @@ class _Group extends \IPS\Patterns\ActiveRecord
|
||||
unset( \IPS\Data\Store::i()->applications );
|
||||
unset( \IPS\Data\Store::i()->modules );
|
||||
unset( \IPS\Data\Store::i()->groups );
|
||||
|
||||
/* Rebuild search index */
|
||||
\IPS\Content\Search\Index::i()->rebuild();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -393,6 +396,29 @@ class _Group extends \IPS\Patterns\ActiveRecord
|
||||
|
||||
/* Update Core Leaders */
|
||||
\IPS\core\StaffDirectory\User::updateEmptySetting();
|
||||
|
||||
/* Deleted group, expire widget caches (online stats may try to load a group) */
|
||||
\IPS\Widget::deleteCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Can this group be deleted?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canDelete() : bool
|
||||
{
|
||||
$extensions = \IPS\Application::allExtensions( 'core', 'GroupForm', FALSE, 'core', 'GroupSettings', TRUE );
|
||||
|
||||
foreach ( $extensions as $class )
|
||||
{
|
||||
if( method_exists( $class, 'canDelete' ) AND !$class->canDelete( $this ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user