Version 5.0.0 beta 7
This commit is contained in:
1 parent
fa2a720105
commit
54d5dcd0a0
156 files changed
+4337
-2995
No files matched your search
@@ -16,7 +16,7 @@ namespace IPS\convert\Software\Forums;
|
||||
use Exception;
|
||||
use IPS\Content;
|
||||
use IPS\convert\Software;
|
||||
use IPS\convert\Software\Core\Wpforo;
|
||||
use IPS\convert\Software\Core\Wpforo as WpforoCore;
|
||||
use IPS\Db;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member;
|
||||
@@ -138,14 +138,14 @@ class Wpforo extends Software
|
||||
/**
|
||||
* Pre-process content for the Invision Community text parser
|
||||
*
|
||||
* @param string The post
|
||||
* @param string|null Content Classname passed by post-conversion rebuild
|
||||
* @param int|null Content ID passed by post-conversion rebuild
|
||||
* @param string $post The post
|
||||
* @param string|null $className Content Classname passed by post-conversion rebuild
|
||||
* @param int|null $contentId Content ID passed by post-conversion rebuild
|
||||
* @return string The converted post
|
||||
*/
|
||||
public static function fixPostData( string $post, ?string $className=null, ?int $contentId=null ): string
|
||||
{
|
||||
return Wpforo::fixPostData( $post, $className, $contentId );
|
||||
return WpforoCore::fixPostData( $post, $className, $contentId );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -202,7 +202,7 @@ class Wpforo extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertForumsForums()
|
||||
public function convertForumsForums() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
$libraryClass::setKey( 'forumid' );
|
||||
@@ -256,7 +256,7 @@ class Wpforo extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertForumsTopics()
|
||||
public function convertForumsTopics() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
$libraryClass::setKey( 'topicid' );
|
||||
@@ -325,7 +325,7 @@ class Wpforo extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertForumsPosts()
|
||||
public function convertForumsPosts() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
$libraryClass::setKey( 'postid' );
|
||||
@@ -366,14 +366,14 @@ class Wpforo extends Software
|
||||
/**
|
||||
* @brief temporarily store post content
|
||||
*/
|
||||
protected $_postContent = [];
|
||||
protected array $_postContent = [];
|
||||
|
||||
/**
|
||||
* Convert attachments
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertAttachments()
|
||||
public function convertAttachments() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
$libraryClass::setKey( 'postid' );
|
||||
@@ -431,8 +431,7 @@ class Wpforo extends Software
|
||||
$this->_postContent[ $pid ] = str_replace( $matches[0][ $key ], '[attachment=' . $attachId . ':name]', $this->_postContent[ $pid ] );
|
||||
}
|
||||
}
|
||||
catch( UnderflowException $e ) {}
|
||||
catch( OutOfRangeException $e ) {}
|
||||
catch( UnderflowException|OutOfRangeException $e ) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -473,8 +472,7 @@ class Wpforo extends Software
|
||||
$this->_postContent[ $pid ] = str_replace( $matches[0][ $key ], '[attachment=' . $attachId . ':name]', $this->_postContent[ $pid ] );
|
||||
}
|
||||
}
|
||||
catch( UnderflowException $e ) {}
|
||||
catch( OutOfRangeException $e ) {}
|
||||
catch( UnderflowException|OutOfRangeException $e ) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -496,7 +494,7 @@ class Wpforo extends Software
|
||||
public function checkRedirects(): ?Url
|
||||
{
|
||||
$url = Request::i()->url();
|
||||
$wpForoSlug = defined('WPFORO_SLUG') ? WPFOROSLUG : 'community';
|
||||
$wpForoSlug = defined('WPFORO_SLUG') ? WPFORO_SLUG : 'community';
|
||||
|
||||
$matches = [];
|
||||
if( preg_match( '#/' . $wpForoSlug . '/([a-z0-9-]+)/([a-z0-9-]+)#i', $url->data[ Url::COMPONENT_PATH ], $matches ) )
|
||||
|
||||
Reference in new issue
Block a user