Version 5.0.6

This commit is contained in:
Neo committed 2025-12-19 18:55:49 -08:00
1 parent a3a4a9ccbd
commit b89858b2ff
1214 files changed
+92828 -14859

No files matched your search

@@ -15,6 +15,7 @@ namespace IPS\convert\Software\Forums;
use Exception;
use IPS\Content;
use IPS\convert\App;
use IPS\convert\Software;
use IPS\convert\Software\Core\Punbb as PunbbCore;
use IPS\Http\Url;
@@ -122,14 +123,15 @@ class Punbb extends Software
/**
* Pre-process content for the Invision Community text parser
*
* @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
* @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 App|null App object if available
* @return string The converted post
*/
public static function fixPostData( string $post, ?string $className=null, ?int $contentId=null ): string
public static function fixPostData( string $post, ?string $className=null, ?int $contentId=null, ?App $app=null ): string
{
return PunbbCore::fixPostData( $post, $className, $contentId );
return PunbbCore::fixPostData( $post, $className, $contentId, $app );
}
/**
@@ -140,7 +142,6 @@ class Punbb extends Software
public function convertForumsForums(): void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'id' );
foreach( $this->fetch( 'forums', 'id' ) AS $row )
@@ -166,24 +167,12 @@ class Punbb extends Software
catch( UnderflowException $e ) {}
}
/* They don't store the last poster ID. Makes me sad. */
$last_poster_id = 0;
try
{
/* Better hope they haven't changed their name */
$last_poster_id = $this->db->select( 'id', 'users', array( "username=?", $row['last_poster'] ) )->first();
}
catch( UnderflowException $e ) {}
$info = array(
'id' => $row['id'],
'name' => $row['forum_name'],
'description' => $row['forum_desc'],
'topics' => $row['num_topics'],
'posts' => $row['num_posts'],
'last_post' => $row['last_post'],
'last_poster_id' => $last_poster_id,
'last_poster_name' => $row['last_poster'],
'parent_id' => ( $row['parent_forum_id'] == 0 ) ? '1000' . $row['cat_id'] : $row['parent_forum_id'],
'position' => $row['disp_position'],
'redirect_url' => $row['redirect_url'],