Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Converter Smf Class
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2015 Invision Power Services, Inc.
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @package IPS Social Suite
|
||||
* @subpackage Converter
|
||||
* @since 21 Jan 2015
|
||||
@@ -318,7 +318,7 @@ class _Smf extends \IPS\convert\Software
|
||||
$post = str_replace( $search, $replace, $post );
|
||||
|
||||
// And img tags
|
||||
$post = preg_replace("#\[img width=(\d+) height=(\d+)\]([a-zA-Z0-9.:\-/]+)\[\/img\]#i", "[img]$3[/img]", $post);
|
||||
$post = preg_replace("#\[img width=(\d+)(?: height=(\d+))?\]([a-zA-Z0-9.:\-/%\?&_]+)\[\/img\]#i", "[img]$3[/img]", $post);
|
||||
|
||||
//Quotes
|
||||
$post = preg_replace("#\[quote author=(.+?) link=(.+?)=(\d+)\.msg(\d+)(.+?)date=(\d+)\](.+)\[\/quote\]#i", "[quote name=\"$1\" post=\"$4\" timestamp=\"$6\"]$7[/quote]", $post);
|
||||
@@ -360,7 +360,7 @@ class _Smf extends \IPS\convert\Software
|
||||
$libraryClass->convertBanfilter( array(
|
||||
'ban_id' => $row['id_ban'],
|
||||
'ban_type' => 'email',
|
||||
'ban_content' => $row['email_address'],
|
||||
'ban_content' => str_replace( '%' ,'*', $row['email_address'] ),
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -579,6 +579,15 @@ class _Smf extends \IPS\convert\Software
|
||||
|
||||
$libraryClass->setLastKeyValue( $row['id_group'] );
|
||||
}
|
||||
|
||||
/* Now check for group promotions */
|
||||
if( count( $libraryClass->groupPromotions ) )
|
||||
{
|
||||
foreach( $libraryClass->groupPromotions as $groupPromotion )
|
||||
{
|
||||
$libraryClass->convertGroupPromotion( $groupPromotion );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -654,7 +663,7 @@ class _Smf extends \IPS\convert\Software
|
||||
'bday_month' => $bday_month,
|
||||
'bday_year' => $bday_year,
|
||||
'mgroup_others' => $row['additional_groups'],
|
||||
'signature' => $row['signature'],
|
||||
'signature' => static::fixPostData( $row['signature'] ),
|
||||
'pp_reputation_points' => $row['karma_good'] - $row['karma_bad'],
|
||||
'timezone' => $row['time_offset'],
|
||||
'allow_admin_mails' => $row['notify_announcements'],
|
||||
@@ -787,7 +796,7 @@ class _Smf extends \IPS\convert\Software
|
||||
/* Clean filename per legacy SMF requirements */
|
||||
$cleanName = strtr( $attach['filename'], 'ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüýÿ', 'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy');
|
||||
$cleanName = strtr( $cleanName, array( 'Þ' => 'TH', 'þ' => 'th', 'Ð' => 'DH', 'ð' => 'dh', 'ß' => 'ss', 'Œ' => 'OE', 'œ' => 'oe', 'Æ' => 'AE', 'æ' => 'ae', 'µ' => 'u' ) );
|
||||
$cleanName = preg_replace( array( '/s/', '/[^w_.-]/' ), array( '_', '' ), $cleanName );
|
||||
$cleanName = preg_replace( array('/\s/', '/[^\w_\.\-]/'), array('_', ''), $cleanName );
|
||||
$location = $attach['id_attach'] . '_' . str_replace( '.', '_', $cleanName ) . md5( $cleanName );
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user