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

@@ -494,6 +494,7 @@ class _Smf extends \IPS\convert\Software
);
/* We need to figure out where it is */
$legacyName = null;
if ( $row['file_hash'] )
{
$location = $row['id_attach'] . '_' . $row['file_hash'];
@@ -506,6 +507,7 @@ class _Smf extends \IPS\convert\Software
$cleanName = preg_replace( array('/\s/', '/[^\w_\.\-]/'), array('_', ''), $cleanName );
$location = $row['id_attach'] . '_' . str_replace( '.', '_', $cleanName ) . md5( $cleanName );
$legacyName = preg_replace( '~\.[\.]+~', '.', $cleanName);
}
$location = str_replace( ' ', '_', $location );
@@ -536,16 +538,31 @@ class _Smf extends \IPS\convert\Software
if ( $row['id_folder'] AND $row['id_folder'] != 1 )
{
$path = rtrim( $this->app->_session['more_info']['convertAttachments']['attach_location'], '/' ) . '/' . $location;
if( !file_exists( $path ) AND isset( $legacyName ) )
{
$path = rtrim( $this->app->_session['more_info']['convertAttachments']['attach_location'], '/' ) . '/' . $legacyName;
}
}
else
{
if ( isset( static::$paths[ $row['id_folder'] ] ) )
{
$path = rtrim( static::$paths[ $row['id_folder'] ], '/' ) . '/' . $location;
if( !file_exists( $path ) AND isset( $legacyName ) )
{
$path = rtrim( static::$paths[ $row['id_folder'] ], '/' ) . '/' . $legacyName;
}
}
else
{
$path = rtrim( $this->app->_session['more_info']['convertAttachments']['attach_location'], '/' ) . '/' . $location;
if( !file_exists( $path ) AND isset( $legacyName ) )
{
$path = rtrim( $this->app->_session['more_info']['convertAttachments']['attach_location'], '/' ) . '/' . $legacyName;
}
}
}