Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -159,10 +159,6 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
'table' => 'pm',
|
||||
'where' => array( 'NOT (folderid= -1 AND parentpmid > 0)' )
|
||||
),
|
||||
'convertRanks' => array(
|
||||
'table' => 'usertitle',
|
||||
'where' => NULL
|
||||
),
|
||||
'convertClubs' => array(
|
||||
'table' => 'socialgroup',
|
||||
'where' => NULL
|
||||
@@ -481,7 +477,7 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
);
|
||||
|
||||
/* And decide what to do about these... */
|
||||
foreach( array( 'homepage', 'icq', 'aim', 'yahoo', 'msn', 'skype' ) AS $field )
|
||||
foreach( array( 'homepage', 'icq', 'aim', 'yahoo', 'msn', 'skype', 'user_title' ) AS $field )
|
||||
{
|
||||
\IPS\Member::loggedIn()->language()->words["field_{$field}"] = \IPS\Member::loggedIn()->language()->addToStack( 'pseudo_field', FALSE, array( 'sprintf' => ucwords( $field ) ) );
|
||||
\IPS\Member::loggedIn()->language()->words["field_{$field}_desc"] = \IPS\Member::loggedIn()->language()->addToStack( 'pseudo_field_desc' );
|
||||
@@ -1030,6 +1026,7 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
|
||||
/* User titles */
|
||||
$userTitles = iterator_to_array( $this->db->select( 'title', 'usertitle' ) );
|
||||
$userTitles = array_merge( $userTitles, iterator_to_array( $this->db->select( 'usertitle', 'usergroup', [ 'usertitle!=?', '' ] ) ) );
|
||||
|
||||
foreach( $this->fetch( 'user', 'user.userid', NULL, 'user.*, usertextfield.signature' )->join( 'usertextfield', 'user.userid = usertextfield.userid' ) AS $user )
|
||||
{
|
||||
@@ -1119,7 +1116,6 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
'mgroup_others' => $user['membergroupids'],
|
||||
'name' => html_entity_decode( $user['username'], \ENT_QUOTES | \ENT_HTML5, 'UTF-8' ),
|
||||
'email' => $user['email'],
|
||||
'member_title' => \in_array( $user['usertitle'], $userTitles ) ? NULL : $user['usertitle'],
|
||||
'joined' => $user['joindate'],
|
||||
'ip_address' => $user['ipaddress'],
|
||||
'warn_level' => ( $user['ipoints'] > 2147483647 ) ? 2147483647 : $user['ipoints'],
|
||||
@@ -1182,7 +1178,7 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
}
|
||||
|
||||
/* Pseudo Fields */
|
||||
foreach( array( 'homepage', 'icq', 'aim', 'yahoo', 'msn', 'skype' ) AS $pseudo )
|
||||
foreach( array( 'homepage', 'icq', 'aim', 'yahoo', 'msn', 'skype', 'user_title' ) AS $pseudo )
|
||||
{
|
||||
/* Are we retaining? */
|
||||
if ( $this->app->_session['more_info']['convertMembers']["field_{$pseudo}"] == 'no_convert' )
|
||||
@@ -1210,8 +1206,15 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
'pf_show_on_reg' => 0,
|
||||
) );
|
||||
}
|
||||
|
||||
$profileFields[$pseudo] = $user[$pseudo];
|
||||
|
||||
if( $pseudo == 'user_title' )
|
||||
{
|
||||
$profileFields[ $pseudo ] = \in_array( $user['usertitle'], $userTitles ) ? NULL : $user['usertitle'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$profileFields[ $pseudo ] = $user[ $pseudo ];
|
||||
}
|
||||
}
|
||||
|
||||
/* Profile Photos */
|
||||
@@ -1256,6 +1259,7 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
$filename = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$filepath = NULL;
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
@@ -1263,6 +1267,11 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
list( $filedata, $filename, $filepath ) = array( NULL, NULL, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
if( !empty( $filedata ) AND empty( $filename ) )
|
||||
{
|
||||
$filename = 'vb-import-' . $info['member_id'] . '.jpg'; // We'll use job here, but image detection will figure it out from magic bytes
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1627,29 +1636,6 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
$libraryClass->setLastKeyValue( $pm['pmid'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert ranks
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertRanks()
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
|
||||
$libraryClass::setKey( 'usertitleid' );
|
||||
|
||||
foreach( $this->fetch( 'usertitle', 'usertitleid' ) AS $rank )
|
||||
{
|
||||
$libraryClass->convertRank( array(
|
||||
'id' => $rank['usertitleid'],
|
||||
'posts' => $rank['minposts'],
|
||||
'title' => $rank['title']
|
||||
) );
|
||||
|
||||
$libraryClass->setLastKeyValue( $rank['usertitleid'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert clubs
|
||||
@@ -2149,7 +2135,7 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
|
||||
try
|
||||
{
|
||||
foreach( $this->db->select( '*', 'pm', array( "parentpmid=?", $pm['pmid'] ) )->join( 'pmtext', 'pm.pmtextid = pmtext.pmtextid' ) AS $post )
|
||||
foreach( $this->db->select( 'folderid, fromuserid', 'pm', array( "parentpmid=?", $pm['pmid'] ) )->join( 'pmtext', 'pm.pmtextid = pmtext.pmtextid' ) AS $post )
|
||||
{
|
||||
if ( $post['folderid'] != -1 )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user