Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -28,7 +28,7 @@ class _Phpbb extends \IPS\convert\Software
|
||||
public static function softwareName()
|
||||
{
|
||||
/* Child classes must override this method */
|
||||
return "phpBB 3.x";
|
||||
return "phpBB (3.1.x/3.2.x)";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -229,7 +229,6 @@ class _Phpbb extends \IPS\convert\Software
|
||||
'follow_notify_freq' => 'immediate',
|
||||
'follow_notify_sent' => 0,
|
||||
'follow_visible' => 1,
|
||||
'follow_index_id' => NULL
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -371,7 +370,6 @@ class _Phpbb extends \IPS\convert\Software
|
||||
'follow_notify_freq' => 'immediate',
|
||||
'follow_notify_sent' => 0,
|
||||
'follow_visible' => 1,
|
||||
'follow_index_id' => NULL
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -495,10 +493,24 @@ class _Phpbb extends \IPS\convert\Software
|
||||
$post = \IPS\Db::i()->select( 'post', 'forums_posts', array( "pid=?", $pid ) )->first();
|
||||
|
||||
$attachmentName = preg_quote( $row['real_filename'], '/' );
|
||||
if ( preg_match( "/\[attachment=(.+?)?\]\<\!\-\- ia0 \-\-\>{$attachmentName}\<\!\-\- ia0 \-\-\>\[\/attachment\]/i", $post ) )
|
||||
{
|
||||
$post = preg_replace( "/\[attachment=(.+?)?\]\<\!\-\- ia0 \-\-\>{$attachmentName}\<\!\-\- ia0 \-\-\>\[\/attachment\]/i", '[attachment=' . $attachId . ':name]', $post );
|
||||
|
||||
$regex31 = '/\[attachment=(.+?)?\]\<\!\-\- ia[\d]+ \-\-\>' . $attachmentName . '\<\!\-\- ia[\d]+ \-\-\>\[\/attachment\]/i';
|
||||
$regex32 = '/\<ATTACHMENT filename\="(.+?)?" index\="(.+?)?"\>\<s\>\[attachment\=(.+?)?\]\<\/s\>' . $attachmentName . '<e\>\[\/attachment\]\<\/e\>\<\/ATTACHMENT\>/i';
|
||||
$changed = FALSE;
|
||||
|
||||
if( preg_match( $regex31, $post ) )
|
||||
{
|
||||
$changed = TRUE;
|
||||
$post = preg_replace( $regex31, '[attachment=' . $attachId . ':name]', $post );
|
||||
}
|
||||
elseif( preg_match( $regex32, $post ) )
|
||||
{
|
||||
$changed = TRUE;
|
||||
$post = preg_replace( $regex32, '[attachment=' . $attachId . ':name]', $post );
|
||||
}
|
||||
|
||||
if( $changed )
|
||||
{
|
||||
\IPS\Db::i()->update( 'forums_posts', array( 'post' => $post ), array( "pid=?", $pid ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user