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\install;
/* 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;
@@ -39,13 +39,15 @@ class _serverdetails extends \IPS\Dispatcher\Controller
$form->add( new \IPS\Helpers\Form\Number( 'sql_port', ini_get('mysqli.default_port'), FALSE ) );
$form->add( new \IPS\Helpers\Form\Text( 'sql_socket', ini_get('mysqli.default_socket'), FALSE ) );
$form->add( new \IPS\Helpers\Form\Text( 'sql_tbl_prefix', NULL, FALSE ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'sql_utf8mb4', TRUE, FALSE ) );
$form->addHeader( 'http_server' );
$form->add( new \IPS\Helpers\Form\Text( 'base_url', ( \IPS\Request::i()->isSecure() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . mb_substr( $_SERVER['SCRIPT_NAME'], 0, -mb_strlen( \IPS\CP_DIRECTORY . '/install/index.php' ) ), TRUE, array( 'size' => 50 ) ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'diagnostics_reporting', FALSE ) );
if ( $values = $form->values() )
{
/* Enforce UTF8MB4 */
$values['sql_utf8mb4'] = TRUE;
try
{
try
@@ -55,7 +57,7 @@ class _serverdetails extends \IPS\Dispatcher\Controller
/* Connection Success, check MySQL version */
$result = \IPS\core\Setup\Upgrade::mysqlRequirements( $db );
if( !$result['requirements']['MySQL']['version']['success'] )
if( !$result['requirements']['MySQL']['version']['success'] AND !\IPS\CIC )
{
throw new \DomainException( $result['requirements']['MySQL']['version']['message'] );
}
@@ -95,11 +97,6 @@ class _serverdetails extends \IPS\Dispatcher\Controller
}
catch ( \UnderflowException $e ) { }
if ( $values['sql_utf8mb4'] and version_compare( $db->server_info, '5.5.3', '<' ) )
{
throw new \DomainException( \IPS\Member::loggedIn()->language()->addToStack('err_no_utf8mb4') );
}
$INFO = NULL;
require \IPS\ROOT_PATH . '/conf_global.php';
$INFO = array_merge( $INFO, $values );
@@ -111,7 +108,7 @@ class _serverdetails extends \IPS\Dispatcher\Controller
if ( \file_put_contents( \IPS\ROOT_PATH . '/conf_global.php', $toWrite ) )
{
/* PHP 5.6 - clear opcode cache or details won't be seen on next page load */
if ( function_exists( 'opcache_invalidate' ) )
if ( \function_exists( 'opcache_invalidate' ) )
{
@opcache_invalidate( \IPS\ROOT_PATH . '/conf_global.php' );
}