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

@@ -1738,6 +1738,12 @@ class Forum extends Model implements Permissions
Lang::deleteCustom( 'forums', $langKey );
}
/* Unclaim Attachments */
foreach( [ 'permerror', 'rules', 'description' ] as $id3 )
{
File::unclaimAttachments( 'forums_Forums', $this->_id, null, $id3 );
}
if( $this->card_image )
{
try
@@ -1792,6 +1798,23 @@ class Forum extends Model implements Permissions
$oldLangKey = str_replace( $this->id, $oldId, $langKey );
Lang::saveCustom( 'forums', $langKey, iterator_to_array( Db::i()->select( 'word_custom, lang_id', 'core_sys_lang_words', array( 'word_key=?', $oldLangKey ) )->setKeyField( 'lang_id' )->setValueField('word_custom') ) );
}
/* If the description had attachments, link them */
$attachmentMappings = [];
foreach( Db::i()->select( '*', 'core_attachments_map', [
[ 'location_key=?', 'forums_Forums' ],
[ 'id1=?', $oldId ],
[ 'id2 is null' ],
[ Db::i()->in( 'id3', [ 'description', 'rules', 'permerror' ] ) ]
] ) as $attachment )
{
$attachment['id1'] = $this->_id;
$attachmentMappings[] = $attachment;
}
if( count( $attachmentMappings ) )
{
Db::i()->insert( 'core_attachments_map', $attachmentMappings );
}
if ( $oldGridImage )
{