Version 5.0.6
This commit is contained in:
1 parent
a3a4a9ccbd
commit
b89858b2ff
1214 files changed
+92828
-14859
No files matched your search
@@ -49,7 +49,7 @@ class Blog extends Core
|
||||
/**
|
||||
* @brief Application
|
||||
*/
|
||||
public string $app = 'blog';
|
||||
public static string $app = 'blog';
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
@@ -51,7 +51,7 @@ class Calendar extends Core
|
||||
/**
|
||||
* @brief Application
|
||||
*/
|
||||
public string $app = 'calendar';
|
||||
public static string $app = 'calendar';
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
@@ -61,7 +61,7 @@ class Cms extends Core
|
||||
/**
|
||||
* @brief Application
|
||||
*/
|
||||
public string $app = 'cms';
|
||||
public static string $app = 'cms';
|
||||
|
||||
/**
|
||||
* Returns a block of text, or a language string, that explains what the admin must do to complete this conversion
|
||||
@@ -938,7 +938,7 @@ class Cms extends Core
|
||||
}
|
||||
|
||||
/* Zero Defaults */
|
||||
foreach( array( 'database_record_count', 'database_all_editable', 'database_comment_approve', 'database_record_approve', 'database_tags_enabled', 'database_tags_noprefixes', 'database_cat_index_type' ) AS $zeroDefault )
|
||||
foreach( array( 'database_record_count', 'database_all_editable', 'database_comment_approve', 'database_record_approve', 'database_tags_enabled', 'database_tags_noprefixes' ) AS $zeroDefault )
|
||||
{
|
||||
if ( !isset( $info[ $zeroDefault ] ) )
|
||||
{
|
||||
@@ -987,40 +987,21 @@ class Cms extends Core
|
||||
else
|
||||
{
|
||||
$info['database_fixed_field_perms'] = json_encode( array(
|
||||
'record' => array(
|
||||
'visible' => TRUE,
|
||||
'perm_view' => '*',
|
||||
'perm_2' => '*',
|
||||
'perm_3' => '*'
|
||||
'record' => array(
|
||||
'visible' => TRUE,
|
||||
'perm_view' => '*',
|
||||
'perm_2' => '*',
|
||||
'perm_3' => '*'
|
||||
),
|
||||
'record_image' => array(
|
||||
'visible' => TRUE,
|
||||
'perm_view' => '*',
|
||||
'perm_2' => '*',
|
||||
'perm_3' => '*'
|
||||
'record_image' => array(
|
||||
'visible' => TRUE,
|
||||
'perm_view' => '*',
|
||||
'perm_2' => '*',
|
||||
'perm_3' => '*'
|
||||
)
|
||||
) );
|
||||
}
|
||||
|
||||
if ( isset( $info['database_featured_settings'] ) )
|
||||
{
|
||||
if ( is_array( $info['database_featured_settings'] ) )
|
||||
{
|
||||
$info['database_featured_settings'] = json_encode( $info['database_featured_settings'] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$info['database_featured_settings'] = json_encode( array(
|
||||
'featured' => FALSE,
|
||||
'perpage' => 10,
|
||||
'pagination' => FALSE,
|
||||
'sort' => 'record_publish_date',
|
||||
'direction' => 'desc',
|
||||
'categories' => 0,
|
||||
) );
|
||||
}
|
||||
|
||||
if ( isset( $info['database_fixed_field_settings'] ) )
|
||||
{
|
||||
if ( is_array( $info['database_fixed_field_settings'] ) )
|
||||
@@ -1039,13 +1020,8 @@ class Cms extends Core
|
||||
}
|
||||
|
||||
/* These are things we will not know, or cannot convert (like templates) */
|
||||
$info['database_template_listing'] = 'listing';
|
||||
$info['database_template_display'] = 'display';
|
||||
$info['database_template_categories'] = 'category_index';
|
||||
$info['database_field_title'] = 0; # we will set this later
|
||||
$info['database_field_content'] = 0; # we will set this later
|
||||
$info['database_template_form'] = 'form';
|
||||
$info['database_template_featured'] = 'category_articles';
|
||||
|
||||
/* Forum Integration */
|
||||
try
|
||||
@@ -2804,7 +2780,8 @@ class Cms extends Core
|
||||
*/
|
||||
public function convertAttachment( array $info=array(), array $map=array(), ?string $filepath=NULL, ?string $filedata=NULL, ?string $thumbnailpath = NULL ) : bool|int
|
||||
{
|
||||
$database = $this->software->app->getLink( str_replace( '-review', '', $map['id3'] ), 'cms_databases' );
|
||||
/* We always skip the link for id3, thus it's already the right database id */
|
||||
$database = str_replace( [ '-review', '-comment' ], '', $map['id3'] );
|
||||
|
||||
$map['id1_type'] = "cms_custom_database_{$database}";
|
||||
$map['id1_from_parent'] = FALSE;
|
||||
@@ -2823,8 +2800,11 @@ class Cms extends Core
|
||||
$map['id2_type'] = 'cms_database_comments';
|
||||
}
|
||||
}
|
||||
|
||||
$map['id3'] = $database;
|
||||
|
||||
if( empty( $map['id3'] ) )
|
||||
{
|
||||
$map['id3'] = $database;
|
||||
}
|
||||
|
||||
return parent::convertAttachment( $info, $map, $filepath, $filedata, $thumbnailpath );
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class Core extends Library
|
||||
/**
|
||||
* @brief Application
|
||||
*/
|
||||
public string $app = 'core';
|
||||
public static string $app = 'core';
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -199,7 +199,7 @@ class Core extends Library
|
||||
$return[$k] = array(
|
||||
'step_title' => 'convert_custom_bbcode',
|
||||
'step_method' => 'convertCustomBbcode',
|
||||
'ips_rows' => Db::i()->select( 'COUNT(*)', 'custom_bbcode' ),
|
||||
'ips_rows' => Db::i()->select( 'COUNT(*)', 'convert_custom_bbcode' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 200,
|
||||
'dependencies' => array(),
|
||||
@@ -2219,7 +2219,7 @@ class Core extends Library
|
||||
}
|
||||
|
||||
/* Now let's do 0 defaults */
|
||||
foreach( array( 'g_delete_own_posts', 'g_is_supmod', 'g_access_cp', 'g_append_edit', 'g_access_offline', 'g_avoid_q', 'g_avoid_flood', 'g_max_messages', 'g_dohtml', 'g_bypass_badwords', 'g_attach_per_post', 'g_dname_changes', 'g_mod_preview', 'g_hide_online_list', 'g_mod_post_unit', 'g_ppd_limit', 'g_ppd_unit', 'g_displayname_unit', 'g_sig_unit' ) AS $zeroIsDefault )
|
||||
foreach( array( 'g_delete_own_posts', 'g_is_supmod', 'g_access_cp', 'g_append_edit', 'g_access_offline', 'g_avoid_q', 'g_avoid_flood', 'g_max_messages', 'g_bypass_badwords', 'g_attach_per_post', 'g_dname_changes', 'g_mod_preview', 'g_hide_online_list', 'g_mod_post_unit', 'g_ppd_limit', 'g_ppd_unit', 'g_displayname_unit', 'g_sig_unit' ) AS $zeroIsDefault )
|
||||
{
|
||||
if ( !isset( $info[$zeroIsDefault] ) )
|
||||
{
|
||||
@@ -3315,7 +3315,7 @@ class Core extends Library
|
||||
|
||||
$info['completed'] = TRUE;
|
||||
$info['member_streams'] = NULL;
|
||||
$info['create_menu'] = NULL;
|
||||
|
||||
$id = $info['member_id'];
|
||||
unset( $info['member_id'] );
|
||||
|
||||
@@ -3859,9 +3859,7 @@ class Core extends Library
|
||||
}
|
||||
|
||||
/* No Longer Used */
|
||||
$topic['mt_hasattach'] = 0;
|
||||
$topic['mt_to_member_id'] = 0;
|
||||
$topic['mt_is_draft'] = 0;
|
||||
$topic['mt_is_system'] = 0;
|
||||
|
||||
if ( isset( $topic['mt_start_time'] ) )
|
||||
|
||||
@@ -49,7 +49,7 @@ class Downloads extends Core
|
||||
/**
|
||||
* @brief Application
|
||||
*/
|
||||
public string $app = 'downloads';
|
||||
public static string $app = 'downloads';
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class Gallery extends Core
|
||||
/**
|
||||
* @brief Application
|
||||
*/
|
||||
public string $app = 'gallery';
|
||||
public static string $app = 'gallery';
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
@@ -53,7 +53,7 @@ class Nexus extends Library
|
||||
/**
|
||||
* @brief Application
|
||||
*/
|
||||
public string $app = 'nexus';
|
||||
public static string $app = 'nexus';
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
Reference in new issue
Block a user