Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -671,7 +671,7 @@ class _Core extends \IPS\convert\Library
|
||||
break;
|
||||
|
||||
case 'convertPrivateMessages':
|
||||
$return['convertPrivateMessages'] = array( 'core_message_topics' => NULL, 'core_message_topic_user_map' => NULL );
|
||||
$return['convertPrivateMessages'] = array( 'core_message_topics' => NULL, 'core_message_topic_user_map' => NULL, 'core_message_posts' => NULL );
|
||||
break;
|
||||
|
||||
case 'convertPrivateMessageReplies':
|
||||
@@ -856,7 +856,7 @@ class _Core extends \IPS\convert\Library
|
||||
{
|
||||
$imageData = file_get_contents( $imagePath );
|
||||
}
|
||||
$file = \IPS\File::create( 'core_Badges', $info['icon'], $imageData, NULL, FALSE, NULL, FALSE );
|
||||
$file = \IPS\File::create( 'core_Ranks', $info['icon'], $imageData, NULL, FALSE, NULL, FALSE );
|
||||
$info['icon'] = (string) $file;
|
||||
}
|
||||
catch( \ErrorException | \Exception $e )
|
||||
@@ -1095,6 +1095,16 @@ class _Core extends \IPS\convert\Library
|
||||
$info['announce_location'] = '*';
|
||||
}
|
||||
|
||||
if ( !isset( $info['announce_permissions'] ) )
|
||||
{
|
||||
$info['announce_permissions'] = '*';
|
||||
}
|
||||
|
||||
if ( !isset( $info['announce_color'] ) )
|
||||
{
|
||||
$info['announce_color'] = 'none';
|
||||
}
|
||||
|
||||
if ( !isset( $info['announce_page_location'] ) )
|
||||
{
|
||||
$info['announce_page_location'] = array( 'sidebar' );
|
||||
@@ -2975,7 +2985,7 @@ class _Core extends \IPS\convert\Library
|
||||
{
|
||||
$group = \IPS\Member\Group::load( $info['ips_group_id'] )->g_id;
|
||||
}
|
||||
catch( \ OutOfRangeException $ex ) {}
|
||||
catch( \OutOfRangeException $ex ) {}
|
||||
|
||||
unset( $info['ips_group_id'] );
|
||||
}
|
||||
@@ -3352,23 +3362,23 @@ class _Core extends \IPS\convert\Library
|
||||
{
|
||||
try
|
||||
{
|
||||
$container = 'monthly_' . date( 'Y', $info['joined'] ) . '_' . date( 'm', $info['joined'] );
|
||||
if ( \is_null( $profileFileData ) AND !\is_null( $profilePhotoPath ) )
|
||||
{
|
||||
$profileFileData = file_get_contents( rtrim( $profilePhotoPath, '/' ) . '/' . $profilePhotoName );
|
||||
\IPS\File::$copyFiles = TRUE;
|
||||
$photo = \IPS\File::create( 'core_Profile', $profilePhotoName, NULL, $container, FALSE, rtrim( $profilePhotoPath, '/' ) . '/' . $profilePhotoName );
|
||||
\IPS\File::$copyFiles = FALSE;
|
||||
}
|
||||
|
||||
$photo = \IPS\File::create( 'core_Profile', $profilePhotoName, $profileFileData );
|
||||
else
|
||||
{
|
||||
$photo = \IPS\File::create( 'core_Profile', $profilePhotoName, $profileFileData, $container );
|
||||
}
|
||||
|
||||
$info['pp_photo_type'] = 'custom';
|
||||
$info['pp_main_photo'] = (string) $photo;
|
||||
$info['pp_thumb_photo'] = (string) $photo->thumbnail( 'core_Profile', \IPS\PHOTO_THUMBNAIL_SIZE, \IPS\PHOTO_THUMBNAIL_SIZE, TRUE );
|
||||
$info['pp_thumb_photo'] = NULL;
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
$info['pp_photo_type'] = '';
|
||||
$info['pp_main_photo'] = NULL;
|
||||
$info['pp_thumb_photo'] = NULL;
|
||||
}
|
||||
catch( \ErrorException $e )
|
||||
catch( \ErrorException | \Exception $e )
|
||||
{
|
||||
$info['pp_photo_type'] = '';
|
||||
$info['pp_main_photo'] = NULL;
|
||||
@@ -3396,12 +3406,7 @@ class _Core extends \IPS\convert\Library
|
||||
/* Designs are different so this will never likely be correct, we'll try it if one is supplied though */
|
||||
$info['pp_cover_offset'] = isset( $info['pp_cover_offset'] ) ? $info['pp_cover_offset'] : 0;
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
$info['pp_cover_photo'] = '';
|
||||
$info['pp_cover_offset'] = 0;
|
||||
}
|
||||
catch( \ErrorException $e )
|
||||
catch( \ErrorException | \Exception $e )
|
||||
{
|
||||
$info['pp_cover_photo'] = '';
|
||||
$info['pp_cover_offset'] = 0;
|
||||
@@ -3484,6 +3489,11 @@ class _Core extends \IPS\convert\Library
|
||||
{
|
||||
$info['member_posts'] = 0;
|
||||
}
|
||||
/* If number is larger than the field we have */
|
||||
elseif( $info['member_posts'] > 8388606 )
|
||||
{
|
||||
$info['member_posts'] = 0;
|
||||
}
|
||||
|
||||
if ( isset( $info['member_last_post'] ) )
|
||||
{
|
||||
@@ -4013,7 +4023,7 @@ class _Core extends \IPS\convert\Library
|
||||
|
||||
if ( \count( $maps ) == 0 )
|
||||
{
|
||||
$this->software->app->log( 'private_message_topic_no_users', __METHOD__, \IPS\convert\App::LOG_WARNING );
|
||||
$this->software->app->log( 'private_message_topic_no_users', __METHOD__, \IPS\convert\App::LOG_WARNING, $topic['mt_id'] );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -4369,16 +4379,24 @@ class _Core extends \IPS\convert\Library
|
||||
{
|
||||
$info['perms'] = json_encode( $info['perms'] );
|
||||
}
|
||||
|
||||
switch( $info['type'] )
|
||||
|
||||
try
|
||||
{
|
||||
case 'm':
|
||||
$info['id'] = $this->software->app->getLink( $info['id'], 'core_members' );
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
$info['id'] = $this->software->app->getLink( $info['id'], 'core_groups' );
|
||||
break;
|
||||
switch( $info['type'] )
|
||||
{
|
||||
case 'm':
|
||||
$info['id'] = $this->software->app->getLink( $info['id'], 'core_members' );
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
$info['id'] = $this->software->app->getLink( $info['id'], 'core_groups' );
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
$this->software->app->log( 'moderator_missing', __METHOD__, \IPS\convert\App::LOG_WARNING, $info['id'] );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
try
|
||||
@@ -6150,11 +6168,11 @@ class _Core extends \IPS\convert\Library
|
||||
* Convert an RSS Imported Item... or try to, anyway.
|
||||
*
|
||||
* @param array $info Data to insert
|
||||
* @param array $contentType Content Link Type
|
||||
* @param string $type Link type for RSS Feed
|
||||
* @param mixed $contentType Content Link Type
|
||||
* @return boolean TRUE on success, or FALSE on failure.
|
||||
*/
|
||||
public function convertRssImported( $info=array(), $contentType, $type='core_rss_import' )
|
||||
public function convertRssImported( $info=array(), $type='core_rss_import', $contentType )
|
||||
{
|
||||
/* Godspeed */
|
||||
if ( isset( $info['rss_imported_import_id'] ) )
|
||||
@@ -6285,7 +6303,7 @@ class _Core extends \IPS\convert\Library
|
||||
$info['tag_member_id'] = 0;
|
||||
}
|
||||
|
||||
if ( isset( $info['tag_added'] ) )
|
||||
if ( !empty( $info['tag_added'] ) )
|
||||
{
|
||||
if ( $info['tag_added'] instanceof \IPS\DateTime )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user