Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\modules\setup\upgrade;
|
||||
|
||||
/* 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;
|
||||
@@ -31,10 +31,8 @@ class _done extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
\IPS\Output::clearJsFiles();
|
||||
|
||||
if ( file_exists( \IPS\ROOT_PATH . '/uploads/logs/upgrader_data.cgi' ) )
|
||||
{
|
||||
@unlink( \IPS\ROOT_PATH . '/uploads/logs/upgrader_data.cgi' );
|
||||
}
|
||||
/* Get rid of temporary upgrade data */
|
||||
\IPS\Db::i()->dropTable( 'upgrade_temp', TRUE );
|
||||
|
||||
/* Reset theme maps to make sure bad data hasn't been cached by visits mid-setup */
|
||||
foreach( \IPS\Theme::themes() as $id => $set )
|
||||
@@ -63,6 +61,9 @@ class _done extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
|
||||
unset( $_SESSION['key'] );
|
||||
|
||||
/* Clear recent datastore logs to prevent an error message displaying immediately after upgrade */
|
||||
\IPS\Db::i()->delete( 'core_log', array( '`category`=? AND `time`>?', 'datastore', \IPS\DateTime::create()->sub( new \DateInterval( 'PT1H' ) )->getTimestamp() ) );
|
||||
|
||||
/* Unset settings datastore to prevent any upgrade settings that were overridden becoming persistent */
|
||||
\IPS\Settings::i()->clearCache();
|
||||
@@ -70,7 +71,13 @@ class _done extends \IPS\Dispatcher\Controller
|
||||
/* IPS Cloud Sync */
|
||||
\IPS\IPS::resyncIPSCloud('Upgraded community');
|
||||
|
||||
/* Remove any new version ACP Notifications */
|
||||
\IPS\core\AdminNotification::remove( 'core', 'NewVersion' );
|
||||
|
||||
/* And show the complete page - the template handles this step special already so we don't have to output anything */
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('done');
|
||||
|
||||
/* The upgrader will cause a few syncs on Cloud2, but we don't have to wait for those. Clear the flag here. */
|
||||
unset( \IPS\Data\Store::i()->syncCompleted );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user