Version 5.0.6
This commit is contained in:
1 parent
a3a4a9ccbd
commit
b89858b2ff
1214 files changed
+92828
-14859
No files matched your search
@@ -51,7 +51,7 @@ class Forums extends Core
|
||||
/**
|
||||
* @brief Application
|
||||
*/
|
||||
public string $app = 'forums';
|
||||
public static string $app = 'forums';
|
||||
|
||||
/**
|
||||
* Returns an array of items that we can convert, including the amount of rows stored in the Community Suite as well as the recommend value of rows to convert per cycle
|
||||
@@ -428,39 +428,6 @@ class Forums extends Core
|
||||
$info['posts'] = 0;
|
||||
}
|
||||
|
||||
if ( isset( $info['last_post'] ) )
|
||||
{
|
||||
if ( $info['last_post'] instanceof DateTime )
|
||||
{
|
||||
$info['last_post'] = $info['last_post']->getTimestamp();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$info['last_post'] = NULL;
|
||||
}
|
||||
|
||||
if ( isset( $info['last_poster_id'] ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
$info['last_poster_id'] = $this->software->app->getLink( $info['last_poster_id'], 'core_members', TRUE );
|
||||
}
|
||||
catch( OutOfRangeException $e )
|
||||
{
|
||||
$info['last_poster_id'] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$info['last_poster_id'] = 0;
|
||||
}
|
||||
|
||||
if ( !isset( $info['last_poster_name'] ) )
|
||||
{
|
||||
$info['last_poster_name'] = '';
|
||||
}
|
||||
|
||||
/* Do parent_id now - we'll need it later */
|
||||
if ( !isset( $info['club_id'] ) )
|
||||
{
|
||||
@@ -540,14 +507,6 @@ class Forums extends Core
|
||||
$info['password_override'] = '';
|
||||
}
|
||||
|
||||
if ( !isset( $info['last_title'] ) )
|
||||
{
|
||||
$info['last_title'] = NULL;
|
||||
}
|
||||
|
||||
/* We can't know this yet */
|
||||
$info['last_id'] = 0;
|
||||
|
||||
if ( !isset( $info['sort_key'] ) )
|
||||
{
|
||||
$info['sort_key'] = 'last_post';
|
||||
@@ -637,33 +596,9 @@ class Forums extends Core
|
||||
|
||||
/* Just reset this */
|
||||
$info['name_seo'] = url::seoTitle( $name );
|
||||
|
||||
if ( !isset( $info['seo_last_title'] ) )
|
||||
{
|
||||
if ( !is_null( $info['last_title'] ) )
|
||||
{
|
||||
$info['seo_last_title'] = Url::seoTitle( $info['last_title'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$info['seo_last_title'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
if ( !isset( $info['seo_last_name'] ) )
|
||||
{
|
||||
if ( !is_null( $info['last_poster_name'] ) )
|
||||
{
|
||||
$info['seo_last_name'] = Url::seoTitle( $info['last_poster_name'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$info['seo_last_name'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
/* No longer used */
|
||||
$info['last_x_topic_ids'] = NULL;
|
||||
|
||||
/* This will auto rebuild on first visit, then recalculate later */
|
||||
unset( $info['last_post'], $info['last_poster_id'], $info['last_poster_name'], $info['seo_last_name'], $info['last_title'], $info['seo_last_title'], $info['last_id'] );
|
||||
|
||||
$bitoptions = 0;
|
||||
if ( isset( $info['forums_bitoptions'] ) )
|
||||
@@ -1217,7 +1152,6 @@ class Forums extends Core
|
||||
|
||||
/* Can't knew these */
|
||||
$info['topic_answered_pid'] = 0;
|
||||
$info['popular_time'] = 0;
|
||||
|
||||
if ( !isset( $info['featured'] ) )
|
||||
{
|
||||
@@ -1430,7 +1364,7 @@ class Forums extends Core
|
||||
unset( $info['pid'] );
|
||||
|
||||
$inserted_id = Db::i()->insert( 'forums_posts', $info );
|
||||
$this->software->app->addLink( $inserted_id, $id, 'forums_posts' );
|
||||
$this->software->app->addLink( $inserted_id, $id, $info['new_topic'] ? 'forums_posts_first' : 'forums_posts' );
|
||||
|
||||
$topicUpdate = array();
|
||||
|
||||
@@ -1976,6 +1910,12 @@ class Forums extends Core
|
||||
$map['id2_type'] = 'forums_posts';
|
||||
$map['id2_from_parent'] = FALSE;
|
||||
$map['location_key'] = 'forums_Forums';
|
||||
|
||||
if( isset( $map['first_post'] ) AND $map['first_post'] === TRUE )
|
||||
{
|
||||
$map['id2_type'] = 'forums_posts_first';
|
||||
unset( $map['first_post'] );
|
||||
}
|
||||
|
||||
return parent::convertAttachment( $info, $map, $filepath, $filedata, $thumbnailpath );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user