Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -4,20 +4,22 @@
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @package IPS Social Suite
|
||||
* @subpackage Converter
|
||||
* @subpackage convert
|
||||
* @since 21 Jan 2015
|
||||
* @version
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* UBBThreads Core Converter
|
||||
*/
|
||||
class _UBBthreads extends \IPS\convert\Software
|
||||
{
|
||||
/**
|
||||
@@ -78,7 +80,7 @@ class _UBBthreads extends \IPS\convert\Software
|
||||
public static function softwareKey()
|
||||
{
|
||||
/* Child classes must override this method */
|
||||
return "UBBthreads";
|
||||
return "ubbthreads";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,11 +138,11 @@ class _UBBthreads 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()
|
||||
{
|
||||
$rows = array();
|
||||
$count = $this->countRows( static::canConvert()['convertMembersFollowers']['table'], static::canConvert()['convertMembersFollowers']['where'] );
|
||||
|
||||
if( $count )
|
||||
@@ -150,7 +152,7 @@ class _UBBthreads extends \IPS\convert\Software
|
||||
'step_title' => 'convert_follows',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'core_follow', array( 'follow_app=? and follow_area=?', 'core', 'member' ) ),
|
||||
'source_rows' => $count,
|
||||
'per_cycle' => 500,
|
||||
'per_cycle' => 200,
|
||||
'dependencies' => array( 'convertMembers' ),
|
||||
'link_type' => 'core_follow',
|
||||
);
|
||||
@@ -208,7 +210,7 @@ class _UBBthreads extends \IPS\convert\Software
|
||||
/**
|
||||
* Attempt to convert a textual date(time) representation to a DateTime instance
|
||||
*
|
||||
* @param string $date
|
||||
* @param string $date Date to try to convert
|
||||
* @return \IPS\DateTime|null
|
||||
*/
|
||||
protected function stringToDateTime( $date )
|
||||
@@ -358,12 +360,13 @@ class _UBBthreads 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 )
|
||||
{
|
||||
$post = preg_replace( "#\[quote=(.+?)\]#i", "[quote name=\"$1\"]", $post );
|
||||
$post = preg_replace( '#\[img:(left|center|right)\](.+?)\[\/img\]#i', '[$1][img]$2[/img][/$1]', $post );
|
||||
$post = str_ireplace( [ "[image]", '[/image]', '[size:', '[color:' ], [ '[img]', '[/img]', '[size=', '[color=' ], $post );
|
||||
|
||||
return $post;
|
||||
@@ -457,7 +460,7 @@ class _UBBthreads extends \IPS\convert\Software
|
||||
|
||||
foreach ( $this->fetch( 'GROUPS', 'GROUP_ID', static::$groupsWhere ) as $row )
|
||||
{
|
||||
/* @TODO: Can we enable custom titles per group? */
|
||||
/* @todo: Can we enable custom titles per group? */
|
||||
$info = array(
|
||||
'g_id' => $row['GROUP_ID'],
|
||||
'g_name' => $row['GROUP_NAME'],
|
||||
@@ -470,7 +473,7 @@ class _UBBthreads extends \IPS\convert\Software
|
||||
}
|
||||
|
||||
/* Now check for group promotions */
|
||||
if( count( $libraryClass->groupPromotions ) )
|
||||
if( \count( $libraryClass->groupPromotions ) )
|
||||
{
|
||||
foreach( $libraryClass->groupPromotions as $groupPromotion )
|
||||
{
|
||||
@@ -604,11 +607,10 @@ class _UBBthreads extends \IPS\convert\Software
|
||||
'pf_desc' => '',
|
||||
'pf_type' => 'Text',
|
||||
'pf_content' => '[]',
|
||||
'pf_member_hide' => 0,
|
||||
'pf_member_hide' => 'all',
|
||||
'pf_max_input' => 255,
|
||||
'pf_member_edit' => 1,
|
||||
'pf_show_on_reg' => 0,
|
||||
'pf_admin_only' => 0,
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -678,7 +680,7 @@ class _UBBthreads extends \IPS\convert\Software
|
||||
foreach ( $this->fetch( 'USER_TITLES', 'USER_TITLE_ID' ) as $row )
|
||||
{
|
||||
/**
|
||||
* @TODO: We should probably prompt to keep or overwrite existing titles, since this can currently result...
|
||||
* @todo: We should probably prompt to keep or overwrite existing titles, since this can currently result...
|
||||
* ...in duplicate entries for the same post counts if the local rows are not dropped
|
||||
*/
|
||||
$libraryClass->convertRank( array(
|
||||
|
||||
Reference in new issue
Block a user