Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -5,19 +5,22 @@
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @package Invision Community
|
||||
* @subpackage Converter
|
||||
* @subpackage convert
|
||||
* @since 14 June 2016
|
||||
*/
|
||||
|
||||
namespace IPS\convert\Software\Core;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* ExpressionEngine Core Converter
|
||||
*/
|
||||
class _Expressionengine extends \IPS\convert\Software
|
||||
{
|
||||
/**
|
||||
@@ -87,23 +90,20 @@ class _Expressionengine extends \IPS\convert\Software
|
||||
/**
|
||||
* Allows software to add additional menu row options
|
||||
*
|
||||
* @param array $rows Existing rows
|
||||
* @return array
|
||||
*/
|
||||
public function extraMenuRows( $rows )
|
||||
public function extraMenuRows()
|
||||
{
|
||||
if( isset( $rows['convertPrivateMessageReplies'] ) )
|
||||
{
|
||||
$rows['convertPmAttachments'] = array(
|
||||
'step_method' => 'convertPmAttachments',
|
||||
'step_title' => 'convert_attachments',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'core_attachments' ),
|
||||
'source_rows' => array( 'table' => static::canConvert()['convertPmAttachments']['table'], 'where' => static::canConvert()['convertPmAttachments']['where'] ),
|
||||
'per_cycle' => 100,
|
||||
'dependencies' => array( 'convertPrivateMessageReplies' ),
|
||||
'link_type' => 'core_attachments',
|
||||
);
|
||||
}
|
||||
$rows = array();
|
||||
$rows['convertPmAttachments'] = array(
|
||||
'step_method' => 'convertPmAttachments',
|
||||
'step_title' => 'convert_attachments',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'core_attachments' ),
|
||||
'source_rows' => array( 'table' => static::canConvert()['convertPmAttachments']['table'], 'where' => static::canConvert()['convertPmAttachments']['where'] ),
|
||||
'per_cycle' => 10,
|
||||
'dependencies' => array( 'convertPrivateMessageReplies' ),
|
||||
'link_type' => 'core_attachments',
|
||||
);
|
||||
|
||||
return $rows;
|
||||
}
|
||||
@@ -147,8 +147,8 @@ class _Expressionengine extends \IPS\convert\Software
|
||||
/**
|
||||
* Fix post data
|
||||
*
|
||||
* @param string raw post data
|
||||
* @return string parsed post data
|
||||
* @param string $post Raw post data
|
||||
* @return string Parsed post data
|
||||
*/
|
||||
public static function fixPostData( $post )
|
||||
{
|
||||
@@ -290,7 +290,7 @@ class _Expressionengine extends \IPS\convert\Software
|
||||
/**
|
||||
* Finish
|
||||
*
|
||||
* @return array
|
||||
* @return array Messages to display
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
@@ -391,11 +391,11 @@ class _Expressionengine extends \IPS\convert\Software
|
||||
$info['pf_type'] = ucwords( $row['m_field_type'] );
|
||||
$info['pf_name'] = $row['m_field_label'];
|
||||
$info['pf_desc'] = $row['m_field_description'];
|
||||
$info['pf_content'] = ( !in_array( $row['m_field_type'], array( 'textbox', 'textarea' ) ) ) ? explode( "\r", $row['field_choices'] ) : NULL;
|
||||
$info['pf_content'] = ( !\in_array( $row['m_field_type'], array( 'textbox', 'textarea' ) ) ) ? explode( "\r", $row['field_choices'] ) : NULL;
|
||||
$info['pf_not_null'] = $row['m_field_required'] == 'y' ? 1 : 0;
|
||||
$info['pf_member_hide'] = $row['m_field_public'] == 'n' ? 1 : 0;
|
||||
$info['pf_member_hide'] = $row['m_field_public'] == 'n' ? 'hide' : 'all';
|
||||
$info['pf_max_input'] = $row['m_field_maxl'];
|
||||
$info['pf_member_edit'] = ( in_array( $row['user_editable'], array( 'yes', 'once' ) ) ) ? 0 : 1;
|
||||
$info['pf_member_edit'] = ( \in_array( $row['user_editable'], array( 'yes', 'once' ) ) ) ? 0 : 1;
|
||||
$info['pf_position'] = $row['m_field_order'];
|
||||
$info['pf_show_on_reg'] = $row['m_field_reg'] == 'y' ? 1 : 0;
|
||||
$info['pf_input_format'] = NULL;
|
||||
@@ -437,7 +437,7 @@ class _Expressionengine extends \IPS\convert\Software
|
||||
}
|
||||
|
||||
/* Now check for group promotions */
|
||||
if( count( $libraryClass->groupPromotions ) )
|
||||
if( \count( $libraryClass->groupPromotions ) )
|
||||
{
|
||||
foreach( $libraryClass->groupPromotions as $groupPromotion )
|
||||
{
|
||||
@@ -526,11 +526,10 @@ class _Expressionengine extends \IPS\convert\Software
|
||||
'pf_desc' => '',
|
||||
'pf_type' => 'Text',
|
||||
'pf_content' => '[]',
|
||||
'pf_member_hide' => 0,
|
||||
'pf_member_hide' => 'all',
|
||||
'pf_max_input' => 500,
|
||||
'pf_member_edit' => 1,
|
||||
'pf_show_on_reg' => 0,
|
||||
'pf_admin_only' => 0,
|
||||
) );
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user