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

@@ -11,7 +11,7 @@
namespace IPS\core\modules\setup\upgrade;
/* 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;
@@ -30,25 +30,30 @@ class _systemcheck extends \IPS\Dispatcher\Controller
public function manage()
{
/* Do we have an older upgrade session hanging around? */
if ( ! isset( \IPS\Request::i()->skippreviousupgrade ) AND file_exists( \IPS\ROOT_PATH . '/uploads/logs/upgrader_data.cgi' ) )
if ( ! isset( \IPS\Request::i()->skippreviousupgrade ) AND \IPS\Db::i()->checkForTable( 'upgrade_temp' ) )
{
$json = json_decode( @file_get_contents( \IPS\ROOT_PATH . '/uploads/logs/upgrader_data.cgi' ), TRUE );
if ( is_array( $json ) and isset( $json['session'] ) and isset( $json['data'] ) )
try
{
$row = \IPS\Db::i()->select( '*', 'upgrade_temp' )->first();
$json = json_decode( $row['upgrade_data'], TRUE );
}
catch( \UnderflowException $e )
{
$json = NULL;
}
if ( \is_array( $json ) and isset( $json['session'] ) and isset( $json['data'] ) )
{
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('unfinished_upgrade');
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->unfinishedUpgrade( $json, @filemtime( \IPS\ROOT_PATH . '/uploads/logs/upgrader_data.cgi' ) );
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->unfinishedUpgrade( $json, $row['lastaccess'] );
return;
}
}
elseif( isset( \IPS\Request::i()->skippreviousupgrade ) AND \IPS\Request::i()->skippreviousupgrade )
{
/* If we skip the previous upgrade remove the file now. That way if we hit utf8 upgrader and come back to upgrader we are
not prompted again to continue our conversion we already elected to start over */
if ( file_exists( \IPS\ROOT_PATH . '/uploads/logs/upgrader_data.cgi' ) )
{
@unlink( \IPS\ROOT_PATH . '/uploads/logs/upgrader_data.cgi' );
}
/* If we skip the previous upgrade remove the temp upgrade data now. That way if we hit utf8 upgrader and come back to upgrader we are
not prompted again to continue our upgrade we already elected to start over */
\IPS\Db::i()->dropTable( 'upgrade_temp', TRUE );
}
/* Do we need to disable designer mode? */
@@ -65,7 +70,7 @@ class _systemcheck extends \IPS\Dispatcher\Controller
$canProceed = FALSE;
if ( !$designersModeEnabled )
{
$canProceed = !isset( $requirements['advice'] ) or !count( $requirements['advice'] );
$canProceed = !isset( $requirements['advice'] ) or !\count( $requirements['advice'] );
if ( $canProceed )
{
foreach ( $requirements['requirements'] as $k => $_requirements )
@@ -82,6 +87,7 @@ class _systemcheck extends \IPS\Dispatcher\Controller
}
/* Check we have the latest version and run an md5 check */
$incorrectFiles = array();
/* Or do not check :) */
/* Display */