Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -220,7 +220,8 @@ class _Invisioncommunity extends \IPS\convert\Software
|
||||
'convertReputationLevels',
|
||||
'convertClubs',
|
||||
'convertAttachments',
|
||||
'convertReactions'
|
||||
'convertReactions',
|
||||
'convertProfileFields'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -267,6 +268,32 @@ class _Invisioncommunity extends \IPS\convert\Software
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'convertProfileFields':
|
||||
$return['convertProfileFields'] = array();
|
||||
|
||||
$options = array();
|
||||
$options['none'] = \IPS\Member::loggedIn()->language()->addToStack( 'none' );
|
||||
foreach( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'core_pfields_data' ), 'IPS\core\ProfileFields\Field' ) AS $field )
|
||||
{
|
||||
$options[ $field->_id ] = $field->_title;
|
||||
}
|
||||
|
||||
foreach( $this->db->select( '*', 'core_pfields_data' ) AS $field )
|
||||
{
|
||||
\IPS\Member::loggedIn()->language()->words["map_pfield_{$field['pf_id']}"] = $this->getWord( 'core_pfield_' . $field['pf_id'] );
|
||||
\IPS\Member::loggedIn()->language()->words["map_pfield_{$field['pf_id']}_desc"] = \IPS\Member::loggedIn()->language()->addToStack( 'map_pfield_desc' );
|
||||
|
||||
$return['convertProfileFields']["map_pfield_{$field['pf_id']}"] = array(
|
||||
'field_class' => 'IPS\\Helpers\\Form\\Select',
|
||||
'field_default' => NULL,
|
||||
'field_required' => FALSE,
|
||||
'field_extra' => array( 'options' => $options ),
|
||||
'field_hint' => NULL,
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'convertGroups':
|
||||
$return['convertGroups'] = array();
|
||||
|
||||
@@ -541,7 +568,10 @@ class _Invisioncommunity extends \IPS\convert\Software
|
||||
$row['pf_name'] = $this->getWord( 'core_pfield_' . $row['pf_id'] );
|
||||
$row['pf_desc'] = $this->getWord( 'core_pfield_' . $row['pf_id'] . '_desc' );
|
||||
|
||||
$libraryClass->convertProfileField( $row );
|
||||
/* Merge with existing field */
|
||||
$merge = ( $this->app->_session['more_info']['convertProfileFields']["map_pfield_{$row['pf_id']}"] != 'none' ) ? $this->app->_session['more_info']['convertProfileFields']["map_pfield_{$row['pf_id']}"] : NULL;
|
||||
|
||||
$libraryClass->convertProfileField( $row, $merge );
|
||||
$libraryClass->setLastKeyValue( $row['pf_id'] );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user