Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -37,6 +37,11 @@ class _login extends \IPS\Dispatcher\Controller
|
||||
/* Do we have an unfinished upgrade? */
|
||||
if ( !\IPS\IN_DEV and ( \IPS\RECOVERY_MODE !== TRUE OR !isset( \IPS\Request::i()->noWarning ) ) and \IPS\Settings::i()->setup_in_progress )
|
||||
{
|
||||
/* Don't allow the upgrade in progress page to be cached, it will only be displayed for a very short period of time */
|
||||
foreach( \IPS\Output::getNoCacheHeaders() as $headerKey => $headerValue )
|
||||
{
|
||||
header( "{$headerKey}: {$headerValue}" );
|
||||
}
|
||||
include( \IPS\ROOT_PATH . '/' . \IPS\CP_DIRECTORY . '/upgrade/upgradeStarted.php' );
|
||||
session_abort();
|
||||
exit;
|
||||
@@ -285,5 +290,14 @@ class _login extends \IPS\Dispatcher\Controller
|
||||
|
||||
\IPS\Db::i()->insert( 'core_admin_login_logs', $save );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return current CSRF token
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getCsrfKey(): ?string
|
||||
{
|
||||
\IPS\Output::i()->json( [ 'key' => \IPS\Session::i()->csrfKey ] );
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,6 @@ class _upgrade extends \IPS\Dispatcher\Controller
|
||||
\IPS\Dispatcher::i()->checkAcpPermission( 'upgrade_manage', 'core', 'overview' );
|
||||
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('ips_suite_upgrade');
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::external( "https://ipbmafia.ru/files/file/2342-invision-community-nulled/" ) );
|
||||
}
|
||||
|
||||
@@ -108,6 +107,13 @@ class _upgrade extends \IPS\Dispatcher\Controller
|
||||
$coreApp->update_version = json_encode( $response );
|
||||
$coreApp->update_last_check = time();
|
||||
$coreApp->save();
|
||||
|
||||
/* Check if we should allow the upgrade to proceed */
|
||||
if( \IPS\CIC AND \IPS\Cicloud\isManaged() AND isset( $response['blockms'] ) AND $response['blockms'] )
|
||||
{
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate('system')->upgradeManagedContactUs( \IPS\Cicloud\managedSupportEmail() );
|
||||
\IPS\Dispatcher::i()->finish();
|
||||
}
|
||||
}
|
||||
catch ( \Exception $e ) { }
|
||||
|
||||
@@ -771,8 +777,10 @@ class _upgrade extends \IPS\Dispatcher\Controller
|
||||
\fwrite( $fh, (string) $response );
|
||||
\fclose( $fh );
|
||||
|
||||
$mrData['range'] = $endRange + 1;
|
||||
return array( $mrData, \IPS\Member::loggedIn()->language()->addToStack('delta_upgrade_downloading'), 100 / $totalFileSize * $mrData['range'] );
|
||||
$mrData['range'] = $endRange + 1;
|
||||
$complete = 100 / $totalFileSize * $mrData['range'];
|
||||
|
||||
return array( $mrData, \IPS\Member::loggedIn()->language()->addToStack('delta_upgrade_downloading'), ( $complete > 100 ) ? 100 : $complete );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -929,7 +937,7 @@ class _upgrade extends \IPS\Dispatcher\Controller
|
||||
\IPS\core\Setup\Upgrade::setUpgradingFlag( FALSE );
|
||||
|
||||
$databaseErrors = FALSE;
|
||||
foreach ( \IPS\Application::enabledApplications() as $app )
|
||||
foreach ( \IPS\Application::applications() as $app )
|
||||
{
|
||||
if( \in_array( $app->directory, \IPS\IPS::$ipsApps ) )
|
||||
{
|
||||
@@ -940,14 +948,20 @@ class _upgrade extends \IPS\Dispatcher\Controller
|
||||
$latestHVersion = array_pop( $humanVersions );
|
||||
\IPS\Db::i()->update( 'core_applications', array( 'app_version' => $latestHVersion, 'app_long_version' => $latestLVersion ), array( 'app_directory=?', $app->directory ) );
|
||||
\IPS\Db::i()->insert( 'core_upgrade_history', array( 'upgrade_version_human' => $latestHVersion, 'upgrade_version_id' => $latestLVersion, 'upgrade_date' => time(), 'upgrade_mid' => (int) \IPS\Member::loggedIn()->member_id, 'upgrade_app' => $app->directory ) );
|
||||
|
||||
|
||||
if( !$app->enabled )
|
||||
{
|
||||
// Do not run the database check if the app is disabled.
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( $app->databaseCheck() )
|
||||
{
|
||||
$databaseErrors = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
unset( \IPS\Data\Store::i()->applications );
|
||||
unset( \IPS\Data\Store::i()->applications, \IPS\Data\Store::i()->updatecount_applications );
|
||||
|
||||
\IPS\core\AdminNotification::remove( 'core', 'NewVersion' );
|
||||
|
||||
@@ -1134,8 +1148,7 @@ class _upgrade extends \IPS\Dispatcher\Controller
|
||||
$perLoop = 150;
|
||||
$i = 0;
|
||||
$done = 0;
|
||||
$xml = new \IPS\Xml\XMLReader;
|
||||
$xml->open( \IPS\ROOT_PATH . "/applications/{$app}/data/theme.xml" );
|
||||
$xml = \IPS\Xml\XMLReader::safeOpen( \IPS\ROOT_PATH . "/applications/{$app}/data/theme.xml" );
|
||||
$xml->read();
|
||||
while ( $xml->read() )
|
||||
{
|
||||
@@ -1321,8 +1334,7 @@ class _upgrade extends \IPS\Dispatcher\Controller
|
||||
$i = 0;
|
||||
$done = 0;
|
||||
$inserts = array();
|
||||
$xml = new \IPS\Xml\XMLReader;
|
||||
$xml->open( \IPS\ROOT_PATH . "/applications/{$app}/data/lang.xml" );
|
||||
$xml = \IPS\Xml\XMLReader::safeOpen( \IPS\ROOT_PATH . "/applications/{$app}/data/lang.xml" );
|
||||
$xml->read();
|
||||
$xml->read();
|
||||
$xml->read();
|
||||
@@ -1455,8 +1467,7 @@ class _upgrade extends \IPS\Dispatcher\Controller
|
||||
$perLoop = 150;
|
||||
$i = 0;
|
||||
$done = 0;
|
||||
$xml = new \IPS\Xml\XMLReader;
|
||||
$xml->open( \IPS\ROOT_PATH . "/applications/{$app}/data/javascript.xml" );
|
||||
$xml = \IPS\Xml\XMLReader::safeOpen( \IPS\ROOT_PATH . "/applications/{$app}/data/javascript.xml" );
|
||||
$xml->read();
|
||||
while ( $xml->read() )
|
||||
{
|
||||
@@ -1575,4 +1586,15 @@ class _upgrade extends \IPS\Dispatcher\Controller
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the database checker
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function databaseChecker()
|
||||
{
|
||||
/* We can re-use the method used for the support section, however we need to pass a different bool */
|
||||
( new \IPS\core\modules\admin\support\support )->_databaseChecker( TRUE );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user