Version 5.0.0 beta 10

This commit is contained in:
Neo committed 2025-12-19 17:53:48 -08:00
1 parent 56979f8ee8
commit 264eeb97e0
325 files changed
+6442 -1849

No files matched your search

@@ -379,9 +379,21 @@ class Group extends Model
}
$oldImage = $this->image;
$oldId = $this->id;
parent::__clone();
$attachmentsMap = [];
foreach( Db::i()->select( '*', 'core_attachments_map', [ 'location_key=? and id1=? and id3=?', 'nexus_Admin', $oldId, 'pgroup' ] ) as $attachment )
{
$attachment['id1'] = $this->id;
$attachmentsMap[] = $attachment;
}
if( count( $attachmentsMap ) )
{
Db::i()->insert( 'core_attachments_map', $attachmentsMap );
}
if ( $oldImage )
{
try
@@ -439,4 +451,16 @@ class Group extends Model
return $buttons;
}
/**
* [ActiveRecord] Delete Record
*
* @return void
*/
public function delete(): void
{
parent::delete();
File::unclaimAttachments( 'nexus_Admin', $this->id, null, 'pgroup' );
}
}