Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -110,7 +110,7 @@ class _Phpbb extends \IPS\convert\Software
|
||||
{
|
||||
$rows['convertBanfilters2'] = $rows['convertBanfilters'];
|
||||
$rows['convertBanfilters2']['step_method'] = 'convertBanfilters2';
|
||||
$rows['convertBanfilters2']['source_rows'] = $this->countRows( static::canConvert()['convertBanfilters2']['table'], static::canConvert()['convertBanfilters2']['where'] );
|
||||
$rows['convertBanfilters2']['source_rows'] = array( 'table' => static::canConvert()['convertBanfilters2']['table'], 'where' => static::canConvert()['convertBanfilters2']['where'] );
|
||||
}
|
||||
|
||||
return $rows;
|
||||
@@ -361,9 +361,37 @@ class _Phpbb extends \IPS\convert\Software
|
||||
/* Convert newlines to <br> tags */
|
||||
$post = nl2br($post);
|
||||
|
||||
/* Preserve code data */
|
||||
$codeboxes = array();
|
||||
preg_match_all( "/\[code(.*?)\](.+?)\[\/code\]/ims", $post, $matches );
|
||||
|
||||
foreach( $matches[0] as $k => $m )
|
||||
{
|
||||
$c = \count( $codeboxes );
|
||||
$codeboxes[ $c ] = $m;
|
||||
|
||||
$replacement = '__CODE_BOX_' . $c . '__';
|
||||
|
||||
$post = str_replace( $m, $replacement, $post );
|
||||
}
|
||||
|
||||
/* Convert HTML entities back into actual entities */
|
||||
$post = html_entity_decode($post, ENT_COMPAT | ENT_HTML401, "UTF-8");
|
||||
|
||||
/* Put codeboxes back */
|
||||
foreach( $codeboxes as $k => $v )
|
||||
{
|
||||
$post = str_replace( '__CODE_BOX_' . $k . '__', $v, $post );
|
||||
}
|
||||
|
||||
/* PhpBB 3.2 */
|
||||
$search = array( '<r>', '<t>', '<s>', '<e>', '<code>', '</r>', '</t>', '</s>', '</e>', '</img>', '</url>', '</quote>', '</link_text>', '</code>' );
|
||||
$post = str_ireplace( $search, '', $post );
|
||||
$post = preg_replace( '/<url url=\"([^\]]+?)"([^>]+?)?>/i', '', $post );
|
||||
$post = preg_replace( '/<img src=\"([^\]]+?)"([^>]+?)?>/i', '', $post );
|
||||
$post = preg_replace( '/<quote author=\"([^\]]+?)"([^>]+?)?>/i', '', $post );
|
||||
$post = preg_replace( '/<link_text text=\"([^\]]+?)"([^>]+?)?>/i', '', $post );
|
||||
|
||||
/* Rework quotes so they'll match our parser style */
|
||||
$post = str_replace( '][quote', "]\n[quote", $post );
|
||||
$post = preg_replace( "#\[quote=(.+)\]#", "[quote name=$1]", $post );
|
||||
@@ -704,7 +732,8 @@ class _Phpbb extends \IPS\convert\Software
|
||||
$filename = array_pop( $filebits );
|
||||
$filepath = implode( '/', $filebits );
|
||||
break;
|
||||
|
||||
|
||||
case 'avatar.driver.local':
|
||||
case 'avatar.driver.gallery':
|
||||
/* I couldn't figure out how to set these up so they are probably wrong */
|
||||
$filepath = $this->app->_session['more_info']['convertMembers']['gallery_location'];
|
||||
@@ -1139,7 +1168,7 @@ class _Phpbb extends \IPS\convert\Software
|
||||
* @param string $password Password from form
|
||||
* @return bool
|
||||
*/
|
||||
public function login( $member, $password )
|
||||
public static function login( $member, $password )
|
||||
{
|
||||
$password = html_entity_decode( $password );
|
||||
$success = FALSE;
|
||||
|
||||
Reference in new issue
Block a user