Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -339,6 +339,11 @@ class _Install
|
||||
$this->diagnostics = $diagnostics;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Custom Title
|
||||
*/
|
||||
protected $customTitle = NULL;
|
||||
|
||||
/**
|
||||
* Process
|
||||
*
|
||||
@@ -366,7 +371,7 @@ class _Install
|
||||
}
|
||||
$response = call_user_func( array( $this, "step{$step}" ), $data );
|
||||
|
||||
return array( $response, \IPS\Member::loggedIn()->language()->addToStack( 'install_step_' . $step ), ( ( ( 100/12 ) * $data[0] + ( ( 100/12 ) / 100 * $this->stepProgress ) ) ) ?: 1 );
|
||||
return array( $response, ( $this->customTitle ) ? $this->customTitle : \IPS\Member::loggedIn()->language()->addToStack( 'install_step_' . $step ), ( ( ( 100/12 ) * $data[0] + ( ( 100/12 ) / 100 * $this->stepProgress ) ) ) ?: 1 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -438,6 +443,8 @@ class _Install
|
||||
$data[2] = 0;
|
||||
}
|
||||
|
||||
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('install_step_1_app'), $app, $data[2] );
|
||||
|
||||
if ( file_exists( \IPS\ROOT_PATH . "/applications/{$app}/data/schema.json" ) )
|
||||
{
|
||||
$schema = json_decode( file_get_contents( \IPS\ROOT_PATH . "/applications/{$app}/data/schema.json" ), TRUE );
|
||||
@@ -556,6 +563,7 @@ class _Install
|
||||
/* Get version data */
|
||||
if ( file_exists( \IPS\ROOT_PATH . "/applications/{$app}/data/versions.json" ) )
|
||||
{
|
||||
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('install_step_2_app'), $app );
|
||||
$versions = json_decode( file_get_contents( \IPS\ROOT_PATH . "/applications/{$app}/data/versions.json" ), TRUE );
|
||||
$keys = array_keys( $versions );
|
||||
|
||||
@@ -614,6 +622,7 @@ class _Install
|
||||
{
|
||||
return $this->appLoop( $data, function( $app )
|
||||
{
|
||||
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('install_step_3_app'), $app );
|
||||
\IPS\Application::load( $app )->installSettings();
|
||||
|
||||
if ( $app === 'core' )
|
||||
@@ -676,6 +685,7 @@ class _Install
|
||||
{
|
||||
return $this->appLoop( $data, function( $app )
|
||||
{
|
||||
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('install_step_5_app'), $app );
|
||||
\IPS\Application::load( $app )->installTasks();
|
||||
|
||||
} );
|
||||
@@ -738,7 +748,7 @@ class _Install
|
||||
{
|
||||
$data[2] = 0;
|
||||
}
|
||||
|
||||
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('install_step_7_app'), $app, $data[2] );
|
||||
$inserted = \IPS\Application::load( $app )->installLanguages( $data[2], 250 );
|
||||
|
||||
if ( $inserted )
|
||||
@@ -763,6 +773,7 @@ class _Install
|
||||
{
|
||||
return $this->appLoop( $data, function( $app )
|
||||
{
|
||||
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('install_step_8_app'), $app );
|
||||
\IPS\Application::load( $app )->installEmailTemplates();
|
||||
} );
|
||||
}
|
||||
@@ -781,7 +792,8 @@ class _Install
|
||||
{
|
||||
$data[2] = 0;
|
||||
}
|
||||
|
||||
|
||||
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('install_step_9_app'), $app, $data[2] );
|
||||
if( $data[2] == 0 )
|
||||
{
|
||||
\IPS\Application::load( $app )->installThemeSettings();
|
||||
@@ -817,6 +829,7 @@ class _Install
|
||||
$data[2] = 0;
|
||||
}
|
||||
|
||||
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('install_step_10_app'), $app, $data[2] );
|
||||
$inserted = \IPS\Application::load( $app )->installJavascript( $data[2], 250 );
|
||||
|
||||
if ( $inserted )
|
||||
@@ -841,6 +854,7 @@ class _Install
|
||||
{
|
||||
return $this->appLoop( $data, function( $app )
|
||||
{
|
||||
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('install_step_11_app'), $app );
|
||||
\IPS\Application::load( $app )->installSearchKeywords();
|
||||
} );
|
||||
}
|
||||
@@ -865,7 +879,8 @@ class _Install
|
||||
{
|
||||
throw new \RuntimeException( sprintf( \IPS\Member::loggedIn()->language()->get("hook_file_not_writable"), \IPS\ROOT_PATH . '/plugins/hooks.php' ) );
|
||||
}
|
||||
|
||||
|
||||
$this->customTitle = sprintf( \IPS\Member::loggedIn()->language()->get('install_step_12_app'), $app );
|
||||
try
|
||||
{
|
||||
\IPS\Application::load( $app )->installHooks();
|
||||
|
||||
@@ -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' );
|
||||
|
||||
Reference in new issue
Block a user