Version 5.0.6
This commit is contained in:
1 parent
a3a4a9ccbd
commit
b89858b2ff
1214 files changed
+92828
-14859
No files matched your search
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user