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

+26 -15
View File
@@ -68,13 +68,14 @@ class _Forums extends Core
case 'convertForumsPosts':
$return[ $k ] = array(
'step_title' => 'convert_forums_posts',
'step_method' => 'convertForumsPosts',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'forums_posts' )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 1000,
'dependencies' => array( 'convertForumsTopics' ),
'link_type' => 'forums_posts',
'step_title' => 'convert_forums_posts',
'step_method' => 'convertForumsPosts',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'forums_posts' )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 1000,
'dependencies' => array( 'convertForumsTopics' ),
'link_type' => 'forums_posts',
'requires_rebuild' => TRUE
);
break;
@@ -201,6 +202,8 @@ class _Forums extends Core
break;
}
}
$return = $this->software->extraMenuRows( $return );
return $return;
}
@@ -244,7 +247,8 @@ class _Forums extends Core
$return['convertForumsForums'] = array(
'core_follow' => array( 'follow_app=? AND follow_area=?', 'forums', 'forum' ),
'core_clubs_node_map' => array( "node_class=?", "IPS\\forums\\Forum" ),
'forums_forums' => NULL
'forums_forums' => NULL,
'core_permission_index' => array( 'app=? AND perm_type=?', 'forums', 'forum' )
);
break;
@@ -800,6 +804,8 @@ class _Forums extends Core
'parent_id' => -1
) );
}
$info['club_id'] = NULL;
}
}
}
@@ -985,7 +991,11 @@ class _Forums extends Core
}
else
{
$info['last_poster_name'] = $info['starter_name'];
/*
* We want to make sure that we're not setting NULL here, although allowed in some places it can
* cause issues with setting the last comment during the post-conversion topic deletion task.
*/
$info['last_poster_name'] = $info['starter_name'] ?: '';
}
}
@@ -2050,13 +2060,14 @@ class _Forums extends Core
/**
* Convert an Attachment
*
* @param array $info Data to insert
* @param array $map Array of Map data
* @param NULL|string $filepath The path to the attachment files or NULL if loading from the database.
* @param NULL|string $filedata If loading from the database, the content of the Binary column.
* @param array $info Data to insert
* @param array $map Array of Map data
* @param NULL|string $filepath The path to the attachment files or NULL if loading from the database.
* @param NULL|string $filedata If loading from the database, the content of the Binary column.
* @param NULL|string $thumnailpath Path to thumbnail image
* @return boolean|integer The ID of the newly inserted attachment, or FALSE on failure.
*/
public function convertAttachment( $info=array(), $map=array(), $filepath=NULL, $filedata=NULL )
public function convertAttachment( $info=array(), $map=array(), $filepath=NULL, $filedata=NULL, $thumbnailpath=NULL )
{
/* The Core Library handles most of this. We just need to make sure forum specific data is set. */
$map['id1_type'] = 'forums_topics';
@@ -2065,7 +2076,7 @@ class _Forums extends Core
$map['id2_from_parent'] = FALSE;
$map['location_key'] = 'forums_Forums';
return parent::convertAttachment( $info, $map, $filepath, $filedata );
return parent::convertAttachment( $info, $map, $filepath, $filedata, $thumbnailpath );
}
/**