Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+7 -7
View File
@@ -589,6 +589,7 @@ class _Install
'sys_module_position' => ++$modulePos,
'sys_module_area' => $area,
'sys_module_default_controller' => $data['default_controller'],
'sys_module_default' => (int) ( isset( $data['default'] ) and $data['default'] )
) );
\IPS\Db::i()->insert( 'core_permission_index', array(
@@ -651,17 +652,16 @@ class _Install
$member->member_group_id = 4;
$member->allow_admin_mails = 0;
$member->joined = time();
$member->members_pass_salt = $member->generateSalt();
$member->members_pass_hash = $member->encryptedPassword( $this->adminPass );
$member->setLocalPassword( $this->adminPass );
$member->members_bitoptions['view_sigs'] = TRUE;
$member->save();
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $this->adminEmail ), "conf_key = 'email_out'" );
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $this->adminEmail ), "conf_key = 'email_in'" );
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $this->adminEmail ), "conf_key = 'upgrade_email'" );
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $this->diagnostics ), "conf_key = 'diagnostics_reporting'" );
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $this->diagnostics ), "conf_key = 'diagnostics_reporting' OR conf_key = 'usage_reporting'" );
unset( \IPS\Data\Store::i()->settings );
\IPS\Settings::i()->clearCache();
return array( 5 );
}
@@ -690,7 +690,7 @@ class _Install
protected function step6( $data )
{
/* Install the default language */
$locales = array( 'en_US', 'en_US.utf8', 'en_US.UTF8' );
$locales = array( 'en_US', 'en_US.utf8', 'en_US.UTF8', 'english' );
foreach ( $locales as $k => $localeCode )
{
try
@@ -880,9 +880,9 @@ class _Install
/* Insert default emoticons and reaction */
if( $app == 'core' )
{
$setId = md5( uniqid() );
$setId = mt_rand();
$position = 0;
\IPS\Lang::saveCustom( 'core', "core_emoticon_group_{$setId}", "Default" );
\IPS\Lang::saveCustom( 'core', "core_emoticon_group_{$setId}", "Classic" );
$inserts = array();
+33 -10
View File
@@ -72,8 +72,9 @@ class _Upgrade
{
if( $e->getCode() !== 115115 )
{
/* We don't want to stop upgrader for this, but we can show the message if the upgrader otherwise cannot continue */
$fileSystemItems[ $class->configurationId ] = array(
'success' => FALSE,
'success' => TRUE,
'message' => $e->getMessage()
);
}
@@ -132,6 +133,18 @@ class _Upgrade
);
}
/* MySQL timeouts */
$db = $db ?: \IPS\Db::i();
$query = $db->query( "SHOW VARIABLES LIKE '%wait_timeout%'" );
while( $row = $query->fetch_assoc() )
{
if ( $row['Variable_name'] == 'wait_timeout' AND $row['Value'] < 20 )
{
$return['advice'][] = \IPS\Member::loggedIn()->language()->addToStack( 'requirements_mysql_timeout', FALSE, array( 'sprintf' => array( $row['Variable_name'], $row['Value'] ) ) );
}
}
return $return;
}
@@ -885,10 +898,7 @@ class _Upgrade
*/
protected function step9( $data )
{
if( isset( \IPS\Data\Store::i()->settings ) )
{
unset( \IPS\Data\Store::i()->settings );
}
\IPS\Settings::i()->clearCache();
if( isset( \IPS\Data\Store::i()->storageConfigurations ) )
{
@@ -942,7 +952,7 @@ class _Upgrade
$data[2] = 0;
}
$inserted = \IPS\Application::load( $app )->installJavascript( $data[2], 150 );
$inserted = \IPS\Application::load( $app )->installJavascript( $data[2], 100 );
\IPS\Log::debug( "Installed javascript for " . $app, 'upgrade' );
@@ -1002,8 +1012,7 @@ class _Upgrade
\IPS\Db::i()->insert( 'core_sys_conf_settings', $insert );
}
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => intval( $value ) ), array( 'conf_key=?', 'setup_in_progress' ) );
unset( \IPS\Data\Store::i()->settings );
\IPS\Settings::i()->changeValues( array( 'setup_in_progress' => intval( $value ) ) );
}
/**
@@ -1193,8 +1202,22 @@ class _Upgrade
if( class_exists( $classname ) )
{
$extension = new $classname;
\IPS\Task::queue( 'core', 'RepairFileUrls', array( 'storageExtension' => $k, 'count' => $extension->count() ), 1 );
try
{
\IPS\Task::queue( 'core', 'RepairFileUrls', array( 'storageExtension' => $k, 'count' => $extension->count() ), 1 );
}
catch ( \IPS\Db\Exception $e )
{
/*
* Don't throw an exception if the table or a column doesn't exist, this can happen
* when newer versions add storage configurations that haven't been set up yet.
*/
if( $e->getCode() !== 1146 AND $e->getCode() !== 1054 )
{
throw $e;
}
}
}
}
}