Version 4.2.0

This commit is contained in:
Neo committed 2025-12-19 05:44:59 -08:00
1 parent 0dc2aee5ed
commit 96997ddd8e
2074 files changed
+125454 -55780

No files matched your search

+42 -35
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Upgrade steps
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 27 May 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\core\setup\upg_30001;
@@ -3736,7 +3735,6 @@ class _Upgrade
*/
public function step2()
{
/* @link http://community.invisionpower.com/tracker/issue-34479-upgrade-fails-if-there-is-a-member-id-0 */
\IPS\Db::i()->delete( "members", "id=0" );
/* Groups */
@@ -3758,6 +3756,16 @@ class _Upgrade
'default' => null
) );
return TRUE;
}
/**
* Step 3
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step3()
{
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
'table' => 'members',
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "members CHANGE COLUMN id member_id MEDIUMINT(8) NOT NULL AUTO_INCREMENT,
@@ -3817,7 +3825,7 @@ class _Upgrade
if ( count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 3 ) ) );
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 4 ) ) );
/* Queries to run manually */
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr ) ) ) );
@@ -3827,11 +3835,11 @@ class _Upgrade
}
/**
* Step 3
* Step 4
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step3()
public function step4()
{
\IPS\Db::i()->update( 'forums', array( 'skin_id' => 0 ) );
@@ -3866,7 +3874,7 @@ class _Upgrade
if ( count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 4 ) ) );
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 5 ) ) );
/* Queries to run manually */
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr ) ) ) );
@@ -3876,11 +3884,11 @@ class _Upgrade
}
/**
* Step 4
* Step 5
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step4()
public function step5()
{
\IPS\Db::i()->dropColumn( 'admin_logs', array( 'act', 'code' ) );
@@ -3938,11 +3946,11 @@ class _Upgrade
}
/**
* Step 5
* Step 6
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step5()
public function step6()
{
\IPS\Db::i()->addColumn( 'pfields_data', array(
'name' => 'pf_group_id',
@@ -4208,11 +4216,11 @@ class _Upgrade
}
/**
* Step 6
* Step 7
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step6()
public function step7()
{
/* Root admin reset? */
require( \IPS\ROOT_PATH . '/conf_global.php' );
@@ -4264,11 +4272,11 @@ class _Upgrade
}
/**
* Step 7
* Step 8
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step7()
public function step8()
{
if( !\IPS\Db::i()->select( 'count(*)', 'profile_portal' )->first() )
{
@@ -4313,7 +4321,7 @@ class _Upgrade
if ( count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 8 ) ) );
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 9 ) ) );
/* Queries to run manually */
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr ) ) ) );
@@ -4323,11 +4331,11 @@ class _Upgrade
}
/**
* Step 8
* Step 9
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step8()
public function step9()
{
$apps = array();
@@ -4396,8 +4404,7 @@ class _Upgrade
/* If we are upgrading from 2.3 and did not upload the calendar files, we still need to insert
the applications table entry, otherwise you won't be able to upgrade down the road. We will
insert it as disabled, however, as calendar won't function since files are not available
@link http://community.invisionpower.com/tracker/issue-33543-ipb2-upgrades */
insert it as disabled, however, as calendar won't function since files are not available */
if( !isset($apps['calendar']['name']) )
{
$apps['calendar'] = array(
@@ -4447,11 +4454,11 @@ class _Upgrade
}
/**
* Step 9
* Step 10
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step9()
public function step10()
{
$fields = array();
@@ -4532,11 +4539,11 @@ class _Upgrade
}
/**
* Step 10
* Step 11
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step10()
public function step11()
{
/* And now calendars */
foreach( \IPS\Db::i()->select( '*', 'cal_calendars' ) as $row )
@@ -4684,11 +4691,11 @@ class _Upgrade
}
/**
* Step 11
* Step 12
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step11()
public function step12()
{
/* Convert PMs */
$pergo = 200;
@@ -4833,11 +4840,11 @@ class _Upgrade
}
/**
* Step 12
* Step 13
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step12()
public function step13()
{
/* Convert block lists */
$pergo = 200;
@@ -4889,11 +4896,11 @@ class _Upgrade
}
/**
* Step 13
* Step 14
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step13()
public function step14()
{
/* Convert PM block lists */
$pergo = 200;
@@ -4935,11 +4942,11 @@ class _Upgrade
}
/**
* Step 14
* Step 15
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step14()
public function step15()
{
/* Reset member languages and skins */
\IPS\Db::i()->update( 'members', array( 'language' => 0, 'skin' => 0 ) );