Version 4.3.6

This commit is contained in:
Neo committed 2025-12-19 05:49:12 -08:00
1 parent fe1acf984a
commit 1a0c7fd3c2
609 files changed
+14707 -5726

No files matched your search

+14 -2
View File
@@ -242,7 +242,7 @@ class _Topic extends \IPS\Content\Item implements
*
* @param \IPS\Node\Model|NULL $container Container
* @return void
* @see \IPS\Topic\Post::incrementPostCount()
* @see \IPS\forums\Topic\Post::incrementPostCount()
*/
public static function incrementPostCount( \IPS\Node\Model $container = NULL )
{
@@ -310,7 +310,7 @@ class _Topic extends \IPS\Content\Item implements
$whereString = 'forums_forums.password=? OR ' . \IPS\Db::i()->findInSet( 'forums_forums.password_override', $member->groups );
$whereParams = array( NULL );
if ( $member === \IPS\Member::loggedIn() )
if ( \IPS\Dispatcher::hasInstance() AND $member === \IPS\Member::loggedIn() )
{
foreach ( \IPS\Request::i()->cookie as $k => $v )
{
@@ -964,6 +964,18 @@ class _Topic extends \IPS\Content\Item implements
parent::move( $container, $keepLink );
\IPS\Db::i()->update( 'forums_question_ratings', array( 'forum' => $container->_id ), array( 'topic=?', $this->tid ) );
/* While you can't normally move archived topics, when you mass manage content from the AdminCP by using the menu next to the forum,
this still allows topics to be moved. If we don't update the archive forum database the forum counts will be off */
if( $this->isArchived() )
{
try
{
\IPS\forums\Topic\ArchivedPost::db()->update( 'forums_archive_posts', array( 'archive_forum_id' => $container->_id ), array( 'archive_topic_id=?', $this->tid ) );
}
/* catch db exceptions if e.g. if the connection credentials didn't work or if the database doesn't exist anymore */
catch ( \IPS\Db\Exception $e ){}
}
}
/**