Version 4.0.13.1 (nulled)
This commit is contained in:
1 parent
c6a86f0d9b
commit
3ba79295ee
19 files changed
+277
-490
No files matched your search
@@ -7,6 +7,7 @@
|
||||
* @package IPS Social Suite
|
||||
* @since 2 July 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
* @modified 13.09.2015 by IAF
|
||||
*/
|
||||
|
||||
namespace IPS\core\modules\admin\overview;
|
||||
@@ -287,90 +288,15 @@ class _dashboard extends \IPS\Dispatcher\Controller
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function upgrade()
|
||||
public function upgrade()
|
||||
{
|
||||
/* Init */
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js('admin_dashboard.js', 'core') );
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('ips_suite_upgrade');
|
||||
|
||||
/* Are all our apps up to date */
|
||||
$coreAppVersion = \IPS\Application::load('core')->long_version;
|
||||
foreach ( \IPS\Application::applications() as $application )
|
||||
{
|
||||
if ( in_array( $application->directory, \IPS\Application::$ipsApps ) and $application->long_version != $coreAppVersion )
|
||||
{
|
||||
\IPS\Output::i()->error( \IPS\Member::loggedIn()->language()->addToStack( 'delta_upgrade_mismatch_versions', FALSE, array( 'sprintf' => array( $application->version, $application->_title, \IPS\Application::load('core')->version, $application->_title ) ) ), '1C283/1', 403, '' );
|
||||
}
|
||||
}
|
||||
|
||||
/* Build the login form */
|
||||
$form = new \IPS\Helpers\Form( 'download', 'download' );
|
||||
if ( isset( \IPS\Request::i()->version ) )
|
||||
{
|
||||
$form->hiddenValues['version'] = \IPS\Request::i()->version;
|
||||
}
|
||||
$form->addMessage('download_upgrade_blurb');
|
||||
$form->add( new \IPS\Helpers\Form\Email( 'ips_email_address', NULL, TRUE ) );
|
||||
$form->add( new \IPS\Helpers\Form\Password( 'ips_password', NULL, TRUE ) );
|
||||
$form = new \IPS\Helpers\Form( NULL, NULL );
|
||||
$form->addMessage( "__iaf__nulling_null_alert", 'ipsMessage ipsMessage_error' ); //No requests to IPS. Only error message about Null.
|
||||
|
||||
/* Handle submissions */
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
$key = \IPS\IPS::licenseKey();
|
||||
|
||||
$url = \IPS\Http\Url::ips( 'build/' . $key['key'] )->setQueryString( 'ip', \IPS\Request::i()->ipAddress() );
|
||||
if ( \IPS\USE_DEVELOPMENT_BUILDS )
|
||||
{
|
||||
$url = $url->setQueryString( 'development', 1 );
|
||||
}
|
||||
elseif ( isset( $values['version'] ) )
|
||||
{
|
||||
$url = $url->setQueryString( 'versionToDownload', $values['version'] );
|
||||
}
|
||||
if ( \IPS\CP_DIRECTORY !== 'admin' )
|
||||
{
|
||||
$url = $url->setQueryString( 'cp_directory', \IPS\CP_DIRECTORY );
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$response = $url->request( 30 )->login( $values['ips_email_address'], $values['ips_password'] )->get();
|
||||
switch ( $response->httpResponseCode )
|
||||
{
|
||||
case 200:
|
||||
if ( !preg_match( '/^ips_[a-z0-9]{5}$/', (string) $response ) )
|
||||
{
|
||||
\IPS\Log::i( LOG_DEBUG )->write( (string) $response );
|
||||
$form->error = \IPS\Member::loggedIn()->language()->addToStack('download_upgrade_error');
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'overview' )->deltaUpgradeInstructions( \IPS\Http\Url::ips( 'download/' . $response ), $response );
|
||||
return;
|
||||
}
|
||||
|
||||
case 304:
|
||||
if ( \IPS\Db::i()->select( 'MIN(app_long_version)', 'core_applications', \IPS\Db::i()->in( 'app_directory', \IPS\Application::$ipsApps ) )->first() < \IPS\Application::getAvailableVersion('core') )
|
||||
{
|
||||
\IPS\Output::i()->redirect( 'upgrade' );
|
||||
}
|
||||
$form->error = \IPS\Member::loggedIn()->language()->addToStack('download_upgrade_nothing');
|
||||
break;
|
||||
|
||||
default:
|
||||
$form->error = (string) $response;
|
||||
}
|
||||
|
||||
}
|
||||
catch ( \Exception $exception )
|
||||
{
|
||||
\IPS\Log::i( LOG_DEBUG )->write( get_class( $exception ) . "\n" . $exception->getCode() . ": " . $exception->getMessage() . "\n" . $exception->getTraceAsString() );
|
||||
$form->error = \IPS\Member::loggedIn()->language()->addToStack('download_upgrade_error');
|
||||
}
|
||||
}
|
||||
|
||||
/* Display */
|
||||
\IPS\Output::i()->output = $form;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Nulled by IandroidFan (IAF) */
|
||||
Reference in new issue
Block a user