Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

@@ -320,7 +320,6 @@ class _Vbulletin extends \IPS\convert\Software
'follow_notify_freq' => $frequency,
'follow_notify_sent' => 0,
'follow_visible' => 1,
'follow_index_id' => NULL
) );
}
@@ -455,7 +454,6 @@ class _Vbulletin extends \IPS\convert\Software
'follow_notify_freq' => $frequency,
'follow_notify_sent' => 0,
'follow_visible' => 1,
'follow_index_id' => NULL
) );
}
@@ -560,7 +558,17 @@ class _Vbulletin extends \IPS\convert\Software
{
if ( static::$isLegacy === FALSE OR is_null( static::$isLegacy ) )
{
$filedata = $this->db->select( '*', 'filedata', array( "filedataid=?", $attachment['filedataid'] ) )->first();
try
{
$filedata = $this->db->select( '*', 'filedata', array( "filedataid=?", $attachment['filedataid'] ) )->first();
}
catch( \UnderflowException $e )
{
/* If the filedata row is missing, there isn't much we can do. */
$libraryClass->setLastKeyValue( $attachment['attachmentid'] );
$this->app->log( 'vb_attach_missing_filedata', __METHOD__, \IPS\convert\App::LOG_WARNING, $attachment['attachmentid'] );
continue;
}
}
else
{
@@ -597,16 +605,24 @@ class _Vbulletin extends \IPS\convert\Software
}
$attach_id = $libraryClass->convertAttachment( $info, $map, $path, $data );
/* Do some re-jiggery on the post itself to make sure attachment displays */
$entry_id = $this->app->getLink( $attachment[ $column ], 'blog_entries' );
$post = \IPS\Db::i()->select( 'entry_content', 'blog_entries', array( "entry_id=?", $entry_id ) )->first();
if ( preg_match( "/\[ATTACH(.+?)?\]".$attachment['attachmentid']."\[\/ATTACH\]/i", $post ) )
if ( $attach_id !== FALSE )
{
$post = preg_replace( "/\[ATTACH=(.+?)?\]" . $attachment['attachmentid'] . "\[\/ATTACH\]/i", '[attachment=' . $attach_id . ':name]', $post );
\IPS\Db::i()->update( 'blog_entries', array( 'entry_content' => $post ), array( "entry_id=?", $entry_id ) );
try
{
/* Do some re-jiggery on the post itself to make sure attachment displays */
$entry_id = $this->app->getLink( $attachment[ $column ], 'blog_entries' );
$post = \IPS\Db::i()->select( 'entry_content', 'blog_entries', array( "entry_id=?", $entry_id ) )->first();
if ( preg_match( "/\[ATTACH(.+?)?\]".$attachment['attachmentid']."\[\/ATTACH\]/i", $post ) )
{
$post = preg_replace( "/\[ATTACH=(.+?)?\]" . $attachment['attachmentid'] . "\[\/ATTACH\]/i", '[attachment=' . $attach_id . ':name]', $post );
\IPS\Db::i()->update( 'blog_entries', array( 'entry_content' => $post ), array( "entry_id=?", $entry_id ) );
}
}
catch( \UnderflowException $e ) {}
catch( \OutOfRangeException $e ) {}
}
$libraryClass->setLastKeyValue( $attachment['attachmentid'] );