Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

+13 -13
View File
@@ -12,7 +12,7 @@
namespace IPS\forums\setup\upg_40000;
/* 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;
@@ -33,7 +33,7 @@ class _Upgrade
{
$perCycle = 500;
$did = 0;
$limit = intval( \IPS\Request::i()->extra );
$limit = \intval( \IPS\Request::i()->extra );
/* Try to prevent timeouts to the extent possible */
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
@@ -117,7 +117,7 @@ class _Upgrade
{
$test = unserialize( $rule['archive_text'] );
if ( is_array( $test ) )
if ( \is_array( $test ) )
{
\IPS\Db::i()->update( 'forums_archive_rules', array( 'archive_text' => implode( ',', $test ) ), array( 'archive_key=?', $rule['archive_key'] ) );
}
@@ -152,7 +152,7 @@ class _Upgrade
{
$perCycle = 50;
$did = 0;
$limit = intval( \IPS\Request::i()->extra );
$limit = \intval( \IPS\Request::i()->extra );
/* Try to prevent timeouts to the extent possible */
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
@@ -170,11 +170,11 @@ class _Upgrade
{
if ( isset( $forum[ $fieldKey ] ) )
{
if ( in_array( $fieldKey, array( 'description', 'rules_text', 'permission_custom_error' ) ) )
if ( \in_array( $fieldKey, array( 'description', 'rules_text', 'permission_custom_error' ) ) )
{
try
{
$forum[ $fieldKey ] = \IPS\Text\Parser::parseStatic( $forum[ $fieldKey ], TRUE, NULL, NULL, TRUE, TRUE, TRUE );
$forum[ $fieldKey ] = \IPS\Text\LegacyParser::parseStatic( $forum[ $fieldKey ], NULL, TRUE );
}
catch( \InvalidArgumentException $e )
{
@@ -213,7 +213,7 @@ class _Upgrade
$update['password'] = NULL;
}
if ( count( $update ) )
if ( \count( $update ) )
{
\IPS\Db::i()->update( 'forums_forums', $update, array( 'id=?', $forum['id'] ) );
}
@@ -295,7 +295,7 @@ ADD INDEX last_post (forum_id, pinned, last_real_post, state)
'query' => "UPDATE " . \IPS\Db::i()->prefix . "forums_topics SET posts=posts+1, last_real_post=IFNULL(last_post,0)"
) ) );
if ( count( $toRun ) )
if ( \count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 5, '_upgradeData' => 0 ) ) );
@@ -399,7 +399,7 @@ ADD INDEX last_post (forum_id, pinned, last_real_post, state)
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "forums_archive_posts ADD COLUMN archive_field_int INT(10) NULL DEFAULT NULL"
) ) );
if ( count( $toRun ) )
if ( \count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 8 ) ) );
@@ -511,11 +511,11 @@ ADD INDEX last_post (forum_id, pinned, last_real_post, state)
);
}
if( count( $queries ) )
if( \count( $queries ) )
{
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $queries );
if ( count( $toRun ) )
if ( \count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 10 ) ) );
@@ -556,7 +556,7 @@ ADD INDEX last_post (forum_id, pinned, last_real_post, state)
),
) );
if ( count( $toRun ) )
if ( \count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 11 ) ) );
@@ -574,7 +574,7 @@ ADD INDEX last_post (forum_id, pinned, last_real_post, state)
*/
public function step10CustomTitle()
{
return "Fixing legacy post data...";
return "Fixing legacy post data";
}
/**