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

+20 -5
View File
@@ -19,7 +19,7 @@ class cms_hook_Topic extends _HOOK_CLASS_
* @throws \OutOfRangeException|\InvalidArgumentException|\RuntimeException
*/
public function modAction( $action, \IPS\Member $member = NULL, $reason = NULL, $immediately = FALSE )
{
{
if ( $action === 'delete' )
{
/* We used to restrict by forum ID but if you move a topic to a new forum then the forum ID will no longer match */
@@ -59,7 +59,10 @@ class cms_hook_Topic extends _HOOK_CLASS_
catch( \Exception $ex ) { }
}
}
else if ( $action === 'lock' or $action === 'unlock' )
parent::modAction( $action, $member, $reason, $immediately );
if ( $action === 'lock' or $action === 'unlock' )
{
foreach( \IPS\Db::i()->select( '*', 'cms_databases', array( 'database_forum_record=? AND database_forum_comments=?', 1, 1 ) ) as $database )
{
@@ -73,10 +76,22 @@ class cms_hook_Topic extends _HOOK_CLASS_
}
catch( \Exception $ex ) { }
}
}
}
/**
* Can merge?
*
* @param \IPS\Member|NULL $member The member to check for (NULL for currently logged in member)
* @return bool
*/
public function canMerge( $member=NULL )
{
if ( \IPS\cms\Records::topicIsLinked( $this ) )
{
return FALSE;
}
return parent::modAction( $action, $member, $reason, $immediately );
return parent::canMerge( $member );
}
}