Version 4.7.13
This commit is contained in:
1 parent
fd22d99e69
commit
7124a02564
954 files changed
+29277
-59308
No files matched your search
@@ -482,6 +482,13 @@ class _Wordpress extends \IPS\convert\Software
|
||||
{
|
||||
$meta[$m['meta_key']] = $m['meta_value'];
|
||||
}
|
||||
|
||||
/* No filename, no convert */
|
||||
if( !isset( $meta['_wp_attached_file'] ) )
|
||||
{
|
||||
$libraryClass->setLastKeyValue( $row['ID'] );
|
||||
continue;
|
||||
}
|
||||
|
||||
$filename = explode( '/', $meta['_wp_attached_file'] );
|
||||
$filename = array_pop( $filename );
|
||||
|
||||
@@ -688,7 +688,7 @@ class _Invisioncommunity extends \IPS\convert\Software
|
||||
unset( $row['members_bitoptions'], $row['members_bitoptions2'] );
|
||||
|
||||
$path = $this->app->_session['more_info']['convertMembers']['upload_path'] . '/';
|
||||
$libraryClass->convertMember( $row, $profileFields, $profilePhotoName, $path . ( isset( $bits ) ? $bits[0] : '' ), NULL, $coverPhotoName, $path . ( isset( $coverBits[0] ) ? $coverBits[0] : '' ) );
|
||||
$libraryClass->convertMember( $row, $profileFields, $profilePhotoName, $path . ( isset( $bits[0] ) ? $bits[0] : '' ), NULL, $coverPhotoName, $path . ( isset( $coverBits[0] ) ? $coverBits[0] : '' ) );
|
||||
|
||||
/* Any friends need converting to followers? */
|
||||
foreach( $this->db->select( '*', 'core_follow', array( 'follow_app=? AND follow_area=? AND follow_rel_id=?', 'core', 'member', $row['member_id'] ) ) as $follow )
|
||||
|
||||
@@ -31,7 +31,7 @@ class _Wpforo extends \IPS\convert\Software
|
||||
public static function softwareName()
|
||||
{
|
||||
/* Child classes must override this method */
|
||||
return "wpForo (1.9.x)";
|
||||
return "wpForo (2.1.x)";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -406,19 +406,27 @@ class _Wpforo extends \IPS\convert\Software
|
||||
|
||||
foreach( $this->fetch( 'users', 'users.ID' )->join( 'wpforo_profiles', "users.ID=wpforo_profiles.userid" ) AS $user )
|
||||
{
|
||||
try
|
||||
{
|
||||
$joined = ( new \IPS\DateTime( $user['user_registered'] ) )->getTimestamp();
|
||||
}
|
||||
catch( \ValueError $e )
|
||||
{
|
||||
$joined = time();
|
||||
}
|
||||
/* Main Members Table */
|
||||
$info = [
|
||||
'member_id' => $user['ID'],
|
||||
'member_group_id' => $user['groupid'],
|
||||
'mgroup_others' => $user['secondary_groups'],
|
||||
'name' => $user['username'],
|
||||
'mgroup_others' => $user['secondary_groupids'],
|
||||
'name' => $user['display_name'],
|
||||
'email' => $user['user_email'],
|
||||
'joined' => new \IPS\DateTime( $user['user_registered'] ),
|
||||
'joined' => $joined,
|
||||
'conv_password' => $user['user_pass'],
|
||||
'temp_ban' => $user['status'] == 'blocked' ? -1 : 0,
|
||||
'signature' => static::fixPostData( $user['signature'] ?: '' ),
|
||||
'last_visit' => new \IPS\DateTime( $user['last_login'] ),
|
||||
'last_activity' => new \IPS\DateTime( $user['last_login'] ),
|
||||
'last_visit' => $user['online_time'],
|
||||
'last_activity' => $user['online_time']
|
||||
];
|
||||
|
||||
$fields = [];
|
||||
@@ -462,7 +470,7 @@ class _Wpforo extends \IPS\convert\Software
|
||||
/* Take a guess */
|
||||
foreach( [ 'jpg', 'png', 'jpeg', 'gif' ] as $ext )
|
||||
{
|
||||
$filename = \strtolower( \str_replace( '_', '', \preg_replace( '/\s|\.(?=.*\.)/i', '-',$user['username'] ) ) ) . '_' . $user['ID'] . '.' . $ext;
|
||||
$filename = \strtolower( \str_replace( '_', '', \preg_replace( '/\s|\.(?=.*\.)/i', '-',$user['display_name'] ) ) ) . '_' . $user['ID'] . '.' . $ext;
|
||||
|
||||
if( file_exists( $avatarPath . '/' . $filename ) )
|
||||
{
|
||||
|
||||
@@ -611,8 +611,22 @@ class _Xenforo extends \IPS\convert\Software
|
||||
{
|
||||
$post = preg_replace( '#\[quote="([a-zA-Z0-9-_ ]+)(,([a-z0-9\s:])+)?(,([a-z0-9\s:])+)?"]#i', "[quote name='$1']", $post );
|
||||
}
|
||||
|
||||
// finally, give us the post back.
|
||||
|
||||
/* Tables */
|
||||
if ( \stristr( $post, '[table]' ) )
|
||||
{
|
||||
$search = array( '[table]', '[/table]', '[th]', '[/th]', '[tr]', '[/tr]', '[td]', '[/td]' );
|
||||
$replace = array( '<table>', '</table>', '<th>', '</th>', '<tr>', '</tr>', '<td>', '</td>' );
|
||||
|
||||
$post = str_ireplace( $search, $replace, $post );
|
||||
}
|
||||
|
||||
/* Spoilers */
|
||||
if ( \preg_match( "#\[spoiler=#i", $post ) )
|
||||
{
|
||||
$post = preg_replace( '/\[spoiler=("|'|)([a-zA-Z0-9-_ ]+)("|'|)\]/i', "[spoiler]", $post );
|
||||
}
|
||||
|
||||
return $post;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ class _Bbpress extends \IPS\convert\Software
|
||||
$libraryClass::setKey( 'ID' );
|
||||
|
||||
/* Which username type? */
|
||||
$userName = $this->app->_parent->_session['more_info']['convertMembers']['username'] == 'username' ? 'user_login' : 'display_name';
|
||||
$userName = ( isset( $this->app->_parent->_session['more_info']['convertMembers']['username'] ) AND $this->app->_parent->_session['more_info']['convertMembers']['username'] == 'username') ? 'user_login' : 'display_name';
|
||||
|
||||
foreach( $this->fetch( 'posts', 'ID', array( 'post_type=?', 'topic' ) ) AS $row )
|
||||
{
|
||||
@@ -189,7 +189,7 @@ class _Bbpress extends \IPS\convert\Software
|
||||
$libraryClass::setKey( 'ID' );
|
||||
|
||||
/* Which username type? */
|
||||
$userName = $this->app->_parent->_session['more_info']['convertMembers']['username'] == 'username' ? 'user_login' : 'display_name';
|
||||
$userName = ( isset( $this->app->_parent->_session['more_info']['convertMembers']['username'] ) AND $this->app->_parent->_session['more_info']['convertMembers']['username'] == 'username') ? 'user_login' : 'display_name';
|
||||
|
||||
foreach( $this->fetch( 'posts', 'ID', array( '(post_type=? OR post_type=?)', 'topic', 'reply' ) ) AS $row )
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class _Wpforo extends \IPS\convert\Software
|
||||
public static function softwareName()
|
||||
{
|
||||
/* Child classes must override this method */
|
||||
return "wpForo (1.9.x)";
|
||||
return "wpForo (2.1.x)";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -324,10 +324,10 @@ class _Wpforo extends \IPS\convert\Software
|
||||
$libraryClass->convertForumsPost( $info );
|
||||
|
||||
/* Reputation */
|
||||
foreach( $this->db->select( '*', 'wpforo_likes', [ 'postid=?', $row['postid'] ] ) AS $rep )
|
||||
foreach( $this->db->select( '*', 'wpforo_reactions', [ 'postid=? AND type=?', $row['postid'], 'up' ] ) AS $rep )
|
||||
{
|
||||
$libraryClass->convertReputation( [
|
||||
'id' => $rep['likeid'],
|
||||
'id' => $rep['reactionid'],
|
||||
'app' => 'forums',
|
||||
'type' => 'pid',
|
||||
'type_id' => $row['postid'],
|
||||
|
||||
Reference in new issue
Block a user