Version 4.6.0

This commit is contained in:
Neo committed 2025-12-19 05:55:31 -08:00
1 parent f79dcf067a
commit 517a5e1f70
2036 files changed
+110041 -26162

No files matched your search

@@ -255,7 +255,7 @@ class _Smf extends \IPS\convert\Software
'field_validation' => function( $value ) { if ( !@is_dir( $value ) ) { throw new \DomainException( 'path_invalid' ); } },
);
foreach( array( 'gender', 'website_url', 'location', 'icq', 'aim', 'yim', 'msn', 'personal_text' ) AS $field )
foreach( array( 'gender', 'website_url', 'location', 'icq', 'aim', 'yim', 'msn', 'personal_text', 'usertitle' ) AS $field )
{
\IPS\Member::loggedIn()->language()->words["field_{$field}"] = \IPS\Member::loggedIn()->language()->addToStack( 'pseudo_field', FALSE, array( 'sprintf' => $field ) );
\IPS\Member::loggedIn()->language()->words["field_{$field}_desc"] = \IPS\Member::loggedIn()->language()->addToStack( 'pseudo_field_desc' );
@@ -639,6 +639,12 @@ class _Smf extends \IPS\convert\Software
}
}
catch( \UnderflowException $e ) {}
/* Catch out of range issues */
if( $ban > 2147483647 )
{
$ban = -1;
}
$bday_year = $bday_month = $bday_day = NULL;
@@ -672,14 +678,13 @@ class _Smf extends \IPS\convert\Software
'pp_reputation_points' => $row['karma_good'] - $row['karma_bad'],
'timezone' => $row['time_offset'],
'allow_admin_mails' => $row['notify_announcements'],
'member_title' => $row['usertitle'],
'member_posts' => $row['posts'],
);
$pfields = array();
/* Pseudo Profile Fields */
foreach( array( 'gender', 'website_url', 'location', 'icq', 'aim', 'yim', 'msn', 'personal_text' ) AS $pseudo )
foreach( array( 'gender', 'website_url', 'location', 'icq', 'aim', 'yim', 'msn', 'personal_text', 'usertitle' ) AS $pseudo )
{
/* Are we retaining? */
if ( $this->app->_session['more_info']['convertMembers']["field_{$pseudo}"] == 'no_convert' )
@@ -782,14 +787,17 @@ class _Smf extends \IPS\convert\Software
}
}
}
else
/* Nothing yet? try attachments */
if( empty( $filename ) )
{
/* Maybe Uploaded */
try
{
$legacyName = null;
$attach = $this->db->select( '*', 'attachments', array( "id_member=? AND filename LIKE CONCAT( ?, '%' )", $row['id_member'], 'avatar_' ) )->first();
$file = rtrim( $this->app->_session['more_info']['convertMembers']['photo_location'], '/' );
$path = rtrim( $this->app->_session['more_info']['convertMembers']['photo_location'], '/' );
/* We need to figure out where it is */
if ( $attach['file_hash'] )
@@ -803,12 +811,18 @@ class _Smf extends \IPS\convert\Software
$cleanName = strtr( $cleanName, array( 'Þ' => 'TH', 'þ' => 'th', 'Ð' => 'DH', 'ð' => 'dh', 'ß' => 'ss', 'Œ' => 'OE', 'œ' => 'oe', 'Æ' => 'AE', 'æ' => 'ae', 'µ' => 'u' ) );
$cleanName = preg_replace( array('/\s/', '/[^\w_\.\-]/'), array('_', ''), $cleanName );
$location = $attach['id_attach'] . '_' . str_replace( '.', '_', $cleanName ) . md5( $cleanName );
$legacyName = preg_replace( '~\.[\.]+~', '.', $cleanName );
}
if ( @file_exists( $file . '/' . $location ) )
if ( \file_exists( $path . '/' . $location ) )
{
$filename = $attach['filename'];
$filedata = file_get_contents( $file . '/' . $location );
$filepath = $path . '/' . $location;
}
elseif( !empty( $legacyName ) AND \file_exists( $path . '/' . $legacyName ) )
{
$filename = $attach['filename'];
$filepath = $path;
}
}
catch( \UnderflowException $e ) {}