Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Upgrader: Perform Upgrade
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @since 20 May 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
@@ -49,52 +49,22 @@ class _upgrade extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\Log::i( LOG_ERR )->write( "Error : " . $e->getMessage() . "\n" . $e->getTraceAsString(), 'upgrade_error' );
|
||||
}
|
||||
catch( \RuntimeException $ex ){}
|
||||
\IPS\Log::log( $e, 'upgrade_error' );
|
||||
|
||||
/* Error thrown that we want to handle differently */
|
||||
$mrData = json_decode( urldecode( base64_decode( \IPS\Request::i()->mr ) ), true );
|
||||
|
||||
$key = 'mr-' . md5( \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( 'key', $_SESSION['uniqueKey'] ) );
|
||||
|
||||
if ( isset( $_SESSION['updatedData'] ) and isset( $_SESSION['updatedData'][1] ) )
|
||||
{
|
||||
$mrData = $_SESSION['updatedData'];
|
||||
$_SESSION[ $key ] = json_encode( $_SESSION['updatedData'] );
|
||||
}
|
||||
|
||||
$continueData = $mrData;
|
||||
$retryData = $mrData;
|
||||
|
||||
if ( isset( $mrData['extra'] ) or isset( $_SESSION['lastJsonIndex'] ) )
|
||||
{
|
||||
$continueData['extra']['lastSqlId'] = ( isset($_SESSION['lastJsonIndex']) ? ( $_SESSION['lastJsonIndex'] + 1 ) : 0 );
|
||||
$retryData['extra']['lastSqlId'] = ( ( isset($_SESSION['lastJsonIndex']) and $_SESSION['lastJsonIndex'] > 1 ) ? $_SESSION['lastJsonIndex'] - 1 : 0 );
|
||||
}
|
||||
|
||||
if ( isset( $mrData['extra']['_upgradeStep'] ) )
|
||||
{
|
||||
$continueData['extra']['_upgradeStep'] += 1;
|
||||
$continueData['extra']['_upgradeData'] = 0;
|
||||
}
|
||||
|
||||
$continueUrl = \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr' => base64_encode( urlencode( json_encode( $continueData ) ) ), 'mr_continue' => 1 ) );
|
||||
$retryUrl = \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr' => base64_encode( urlencode( json_encode( $retryData ) ) ), 'mr_continue' => 1 ) );
|
||||
|
||||
$continueUrl = \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr' => 1, 'mr_continue' => 1 ) );
|
||||
$retryUrl = \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr' => 1 ) );
|
||||
|
||||
$error = \IPS\Theme::i()->getTemplate( 'global' )->upgradeError( $e, $continueUrl, $retryUrl );
|
||||
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('error');
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->block( 'install', $error, FALSE );
|
||||
|
||||
/* If we're still here - output */
|
||||
if ( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( \IPS\Output::i()->output ), 200, 'text/html', \IPS\Output::i()->httpHeaders );
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->globalTemplate( \IPS\Output::i()->title, \IPS\Output::i()->output ), 200, 'text/html', \IPS\Output::i()->httpHeaders );
|
||||
}
|
||||
return array( \IPS\Theme::i()->getTemplate( 'global' )->block( 'install', $error, FALSE ) );
|
||||
}
|
||||
catch( \BadMethodCallException $e )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user