Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -170,7 +170,7 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
/* Content Rebuilds */
|
||||
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\forums\Forum', 'count' => 0 ), 5, array( 'class' ) );
|
||||
\IPS\Task::queue( 'convert', 'RebuildContent', array( 'app' => $this->app->app_id, 'link' => 'forums_posts', 'class' => 'IPS\forums\Topic\Post' ), 2, array( 'app', 'link', 'class' ) );
|
||||
\IPS\Task::queue( 'core', 'RebuildItemCounts', array( 'class' => 'IPS\forums\Topic' ), 3, array( 'class' ) );
|
||||
\IPS\Task::queue( 'core', 'RebuildItemCounts', array( 'class' => 'IPS\forums\Topic' ), 2, array( 'class' ) ); // This must run before the CMS item count task runs.
|
||||
\IPS\Task::queue( 'convert', 'RebuildFirstPostIds', array( 'app' => $this->app->app_id ), 2, array( 'app' ) );
|
||||
\IPS\Task::queue( 'convert', 'DeleteEmptyTopics', array( 'app' => $this->app->app_id ), 4, array( 'app' ) );
|
||||
|
||||
@@ -365,7 +365,6 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
'follow_notify_freq' => $frequency,
|
||||
'follow_notify_sent' => 0,
|
||||
'follow_visible' => 1,
|
||||
'follow_index_id' => NULL
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -521,7 +520,6 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
'follow_notify_freq' => $frequency,
|
||||
'follow_notify_sent' => 0,
|
||||
'follow_visible' => 1,
|
||||
'follow_index_id' => NULL
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -660,7 +658,7 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
/* Warnings */
|
||||
foreach( $this->db->select( '*', 'infraction', array( "postid=?", $post['postid'] ) ) AS $warn )
|
||||
{
|
||||
$libraryClass->convertWarnLog( array(
|
||||
$warnId = $libraryClass->convertWarnLog( array(
|
||||
'wl_id' => $warn['infractionid'],
|
||||
'wl_member' => $warn['userid'],
|
||||
'wl_moderator' => $warn['whoadded'],
|
||||
@@ -669,6 +667,17 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
'wl_note_member' => $warn['note'],
|
||||
'wl_note_mods' => $warn['customreason'],
|
||||
) );
|
||||
|
||||
/* Add a member history record for this member */
|
||||
$libraryClass->convertMemberHistory( array(
|
||||
'log_id' => 'w' . $warn['infractionid'],
|
||||
'log_member' => $warn['userid'],
|
||||
'log_by' => $warn['whoadded'],
|
||||
'log_type' => 'warning',
|
||||
'log_data' => array( 'wid' => $warnId ),
|
||||
'log_date' => $warn['dateline']
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/* If we have a latest edit, then update the main post - this should really be in the library, as the converters should not be altering data */
|
||||
@@ -715,6 +724,7 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
{
|
||||
/* If the topic is missing, there isn't much we can do. */
|
||||
$libraryClass->setLastKeyValue( $attachment['attachmentid'] );
|
||||
$this->app->log( 'vb_attach_missing_topic', __METHOD__, \IPS\convert\App::LOG_WARNING, $attachment['attachmentid'] );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -728,6 +738,7 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
{
|
||||
/* If the filedata row is missing, there isn't much we can do. */
|
||||
$libraryClass->setLastKeyValue( $attachment['attachmentid'] );
|
||||
$this->app->log( 'vb_attach_missing_filedata', __METHOD__, \IPS\convert\App::LOG_WARNING, $attachment['attachmentid'] );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -965,21 +976,29 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
\IPS\Request::i()->t = $matches[1];
|
||||
\IPS\Request::i()->page = $matches[2];
|
||||
}
|
||||
/* Normal Topics */
|
||||
elseif( preg_match( "/\/(\d+)\-.+?\.html/", $url->data[ \IPS\Http\Url::COMPONENT_PATH ], $matches ) )
|
||||
{
|
||||
$url = $url->setPath( preg_replace( "/\/(\d+)\-.+?\.html/", "/showthread.php", $url->data[ \IPS\Http\Url::COMPONENT_PATH ] ) )->setQueryString( 't', $matches[1] );
|
||||
\IPS\Request::i()->t = $matches[1];
|
||||
}
|
||||
/* Post Links */
|
||||
elseif( preg_match( "/\/(\d+)\-.+?\-post(\d+)\.html/", $url->data[ \IPS\Http\Url::COMPONENT_PATH ], $matches ) )
|
||||
{
|
||||
$url = $url->setPath( preg_replace( "/\/(\d+)\-.+?\-post(\d+)\.html/", "/showpost.php", $url->data[ \IPS\Http\Url::COMPONENT_PATH ] ) )->setQueryString( 'p', $matches[2] );
|
||||
\IPS\Request::i()->p = $matches[2];
|
||||
}
|
||||
}
|
||||
|
||||
/* Forum URLs are the same across VB 3.8 and VB 4 */
|
||||
if( mb_strpos( $url->data[ \IPS\Http\Url::COMPONENT_PATH ], 'forumdisplay.php' ) !== FALSE )
|
||||
{
|
||||
/* Forum URLs can be in one of 3 formats really...
|
||||
* /forumdisplay.php/1-name
|
||||
* /forums/1-name
|
||||
* /forumdisplay.php?f=1
|
||||
*/
|
||||
/* Forum URLs can be in one of 4 formats really...
|
||||
* /forumdisplay.php/1-name
|
||||
* /forums/1-name
|
||||
* /forumdisplay.php?f=1
|
||||
* /forumdisplay.php?1-name
|
||||
*/
|
||||
$path = $url->data[ \IPS\Http\Url::COMPONENT_PATH ];
|
||||
if( mb_strpos( $path, 'forumdisplay.php' ) !== FALSE )
|
||||
{
|
||||
@@ -987,6 +1006,10 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
{
|
||||
$oldId = \IPS\Request::i()->f;
|
||||
}
|
||||
elseif( preg_match( '#^(\d+)-[^/]+#i', $url->data[ \IPS\Http\Url::COMPONENT_QUERY ], $matches ) )
|
||||
{
|
||||
$oldId = $matches[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
$queryStringPieces = explode( '-', mb_substr( $path, mb_strpos( $path, 'forumdisplay.php/' ) + mb_strlen( 'forumdisplay.php/' ) ) );
|
||||
@@ -1064,11 +1087,12 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
/* And then topic URLs, same idea */
|
||||
elseif( mb_strpos( $url->data[ \IPS\Http\Url::COMPONENT_PATH ], 'showthread.php' ) !== FALSE )
|
||||
{
|
||||
/* Topic URLs can be in one of 3 formats really...
|
||||
* /showthread.php/1-name
|
||||
* /threads/1-name
|
||||
* /showthread.php?t=1
|
||||
*/
|
||||
/* Topic URLs can be in one of 4 formats really...
|
||||
* /showthread.php/1-name
|
||||
* /threads/1-name
|
||||
* /showthread.php?t=1
|
||||
* /showthread.php?1-name
|
||||
*/
|
||||
$path = $url->data[ \IPS\Http\Url::COMPONENT_PATH ];
|
||||
if( mb_strpos( $path, 'showthread.php' ) !== FALSE )
|
||||
{
|
||||
@@ -1076,6 +1100,10 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
{
|
||||
$oldId = \IPS\Request::i()->t;
|
||||
}
|
||||
elseif( preg_match( '#^(\d+)-[^/]+#i', $url->data[ \IPS\Http\Url::COMPONENT_QUERY ], $matches ) )
|
||||
{
|
||||
$oldId = $matches[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
$queryStringPieces = explode( '-', mb_substr( $path, mb_strpos( $path, 'showthread.php/' ) + mb_strlen( 'showthread.php/' ) ) );
|
||||
@@ -1156,7 +1184,7 @@ class _Vbulletin extends \IPS\convert\Software
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
$data = $this->getLink( (string) $parameters[1], array( 'topics', 'forums_topics', FALSE, TRUE ) );
|
||||
$data = $this->getLink( (string) $parameters[1], array( 'topics', 'forums_topics' ), FALSE, TRUE );
|
||||
}
|
||||
$item = \IPS\forums\Topic::load( $data );
|
||||
|
||||
|
||||
Reference in new issue
Block a user