Version 4.3.6

This commit is contained in:
Neo committed 2025-12-19 05:49:12 -08:00
1 parent fe1acf984a
commit 1a0c7fd3c2
609 files changed
+14707 -5726

No files matched your search

+25 -6
View File
@@ -135,15 +135,23 @@ class _Upgrade
/* MySQL timeouts */
$db = $db ?: \IPS\Db::i();
$query = $db->query( "SHOW VARIABLES LIKE '%wait_timeout%'" );
while( $row = $query->fetch_assoc() )
try
{
if ( $row['Variable_name'] == 'wait_timeout' AND $row['Value'] < 20 )
$query = $db->query( "SHOW VARIABLES LIKE '%wait_timeout%'" );
while( $row = $query->fetch_assoc() )
{
$return['advice'][] = \IPS\Member::loggedIn()->language()->addToStack( 'requirements_mysql_timeout', FALSE, array( 'sprintf' => array( $row['Variable_name'], $row['Value'] ) ) );
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'] ) ) );
}
}
}
catch( \IPS\Db\Exception $e )
{
$return['advice'][] = $e->getMessage();
}
return $return;
}
@@ -218,6 +226,9 @@ class _Upgrade
/* Clear member menu cache */
\IPS\Member::clearCreateMenu();
/* Clear javascript caches */
\IPS\Output::clearJsFiles();
/* Clear widget caches */
\IPS\Widget::deleteCaches();
@@ -674,6 +685,7 @@ class _Upgrade
{
return $this->appLoop( $data, function( $app ) use( $data )
{
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('upgrade_step_2_app'), $app );
$changesToMake = \IPS\Application::load( $app )->databaseCheck();
if ( count( $changesToMake ) )
{
@@ -711,6 +723,7 @@ class _Upgrade
try
{
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('upgrade_step_3_app'), $app );
$application = \IPS\Application::load( $app );
$application->installJsonData( TRUE );
@@ -774,7 +787,7 @@ class _Upgrade
return $this->appLoop( $data, function( $app )
{
\IPS\Log::debug( "Installing settings, tasks and keywords for " . $app, 'upgrade' );
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('upgrade_step_4_app'), $app );
\IPS\Application::load( $app )->installSettings();
\IPS\Application::load( $app )->installTasks();
\IPS\Application::load( $app )->installSearchKeywords();
@@ -798,6 +811,7 @@ class _Upgrade
try
{
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('upgrade_step_5_app'), $app, $data[2] );
$inserted = \IPS\Application::load( $app )->installLanguages( $data[2], 250 );
\IPS\Log::debug( "Inserted language keys for " . $app . ", offset of " . $data[2], 'upgrade' );
@@ -831,6 +845,7 @@ class _Upgrade
{
return $this->appLoop( $data, function( $app )
{
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('upgrade_step_6_app'), $app );
\IPS\Application::load( $app )->installEmailTemplates();
} );
}
@@ -847,6 +862,7 @@ class _Upgrade
{
try
{
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('upgrade_step_7_app'), $app );
\IPS\Application::load( $app )->installThemeSettings( TRUE );
}
catch( \Exception $e )
@@ -881,6 +897,7 @@ class _Upgrade
try
{
/* Deletes old data from the database */
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('upgrade_step_8_app'), $app );
\IPS\Application::load( $app )->clearTemplates();
}
catch( \Exception $e )
@@ -914,6 +931,7 @@ class _Upgrade
try
{
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('upgrade_step_9_app'), $app, $data[2] );
$inserted = \IPS\Application::load( $app )->installTemplates( TRUE, $data[2], 150 );
}
catch( \Exception $e )
@@ -951,7 +969,8 @@ class _Upgrade
{
$data[2] = 0;
}
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('upgrade_step_10_app'), $app, $data[2] );
$inserted = \IPS\Application::load( $app )->installJavascript( $data[2], 100 );
\IPS\Log::debug( "Installed javascript for " . $app, 'upgrade' );