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\install;
|
||||
|
||||
/* 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;
|
||||
@@ -47,7 +47,7 @@ class _admin extends \IPS\Dispatcher\Controller
|
||||
if ( \file_put_contents( \IPS\ROOT_PATH . '/conf_global.php', $toWrite ) )
|
||||
{
|
||||
/* PHP 5.5 - clear opcode cache or details won't be seen on next page load */
|
||||
if ( function_exists( 'opcache_invalidate' ) )
|
||||
if ( \function_exists( 'opcache_invalidate' ) )
|
||||
{
|
||||
@opcache_invalidate( \IPS\ROOT_PATH . '/conf_global.php' );
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\modules\setup\install;
|
||||
|
||||
/* 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;
|
||||
@@ -103,7 +103,7 @@ class _applications extends \IPS\Dispatcher\Controller
|
||||
},
|
||||
'validate' => function( $element ) use ( $defaultTicks )
|
||||
{
|
||||
if ( !in_array( 'core', $element->value ) )
|
||||
if ( !\in_array( 'core', $element->value ) )
|
||||
{
|
||||
$element->value['core'] = TRUE;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ class _applications extends \IPS\Dispatcher\Controller
|
||||
},
|
||||
'validate' => function( $element ) use ( $apps )
|
||||
{
|
||||
if ( !in_array( $element->value, array_keys( $apps ) ) or !array_key_exists( $element->value, \IPS\Request::i()->apps ) )
|
||||
if ( !\in_array( $element->value, array_keys( $apps ) ) or !array_key_exists( $element->value, \IPS\Request::i()->apps ) )
|
||||
{
|
||||
throw new \DomainException('default_app_invalid');
|
||||
}
|
||||
@@ -135,7 +135,7 @@ class _applications extends \IPS\Dispatcher\Controller
|
||||
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
if ( !in_array( $values['default_app'], array_keys( $values['apps'] ) ) )
|
||||
if ( !\in_array( $values['default_app'], array_keys( $values['apps'] ) ) )
|
||||
{
|
||||
throw new \DomainException('default_app_invalid');
|
||||
}
|
||||
@@ -150,7 +150,7 @@ class _applications extends \IPS\Dispatcher\Controller
|
||||
if ( \file_put_contents( \IPS\ROOT_PATH . '/conf_global.php', $toWrite ) )
|
||||
{
|
||||
/* PHP 5.5 - clear opcode cache or details won't be seen on next page load */
|
||||
if ( function_exists( 'opcache_invalidate' ) )
|
||||
if ( \function_exists( 'opcache_invalidate' ) )
|
||||
{
|
||||
@opcache_invalidate( \IPS\ROOT_PATH . '/conf_global.php' );
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\modules\setup\install;
|
||||
|
||||
/* 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;
|
||||
@@ -62,7 +62,7 @@ class _done extends \IPS\Dispatcher\Controller
|
||||
), TRUE ) . ';' );
|
||||
|
||||
/* PHP 5.5 - clear opcode cache or details won't be seen on next page load */
|
||||
if ( function_exists( 'opcache_invalidate' ) )
|
||||
if ( \function_exists( 'opcache_invalidate' ) )
|
||||
{
|
||||
@opcache_invalidate( \IPS\ROOT_PATH . '/conf_global.php' );
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\modules\setup\install;
|
||||
|
||||
/* 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;
|
||||
@@ -81,11 +81,11 @@ class _install extends \IPS\Dispatcher\Controller
|
||||
/* If we're still here - output */
|
||||
if ( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
\IPS\Output::i()->sendOutput( \IPS\Output::i()->output, 200, 'text/html', \IPS\Output::i()->httpHeaders );
|
||||
\IPS\Output::i()->sendOutput( \IPS\Output::i()->output, 200, 'text/html' );
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->globalTemplate( \IPS\Output::i()->title, \IPS\Output::i()->output ), 403, 'text/html', \IPS\Output::i()->httpHeaders );
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->globalTemplate( \IPS\Output::i()->title, \IPS\Output::i()->output ), 403, 'text/html' );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\modules\setup\install;
|
||||
|
||||
/* 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;
|
||||
@@ -30,7 +30,7 @@ class _license extends \IPS\Dispatcher\Controller
|
||||
public function manage()
|
||||
{
|
||||
$form = new \IPS\Helpers\Form( 'license', 'continue', \IPS\Http\Url::external( ( \IPS\Request::i()->isSecure() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '?controller=license' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'lkey', 'Nulled by IPBMafia.ru | 18.09.2018', TRUE, array( 'size' => 50 ), function( $val )
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'lkey', 'Nulled by IPBMafia.ru | 18.08.2020', TRUE, array( 'size' => 50 ), function( $val )
|
||||
{
|
||||
\IPS\IPS::checkLicenseKey( $val, ( \IPS\Request::i()->isSecure() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . mb_substr( $_SERVER['SCRIPT_NAME'], 0, -mb_strlen( \IPS\CP_DIRECTORY . '/install/index.php' ) ) );
|
||||
}, NULL, '<a href="' . \IPS\Http\Url::ips( 'docs/find_lkey' ) . '" target="_blank" rel="noopener">' . \IPS\Member::loggedIn()->language()->addToStack('lkey_help') . '</a>' ) );
|
||||
@@ -63,7 +63,7 @@ class _license extends \IPS\Dispatcher\Controller
|
||||
else
|
||||
{
|
||||
/* PHP 5.5 - clear opcode cache or details won't be seen on next page load */
|
||||
if ( function_exists( 'opcache_invalidate' ) )
|
||||
if ( \function_exists( 'opcache_invalidate' ) )
|
||||
{
|
||||
@opcache_invalidate( \IPS\ROOT_PATH . '/conf_global.php' );
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\modules\setup\install;
|
||||
|
||||
/* 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;
|
||||
@@ -39,13 +39,15 @@ class _serverdetails extends \IPS\Dispatcher\Controller
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'sql_port', ini_get('mysqli.default_port'), FALSE ) );
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'sql_socket', ini_get('mysqli.default_socket'), FALSE ) );
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'sql_tbl_prefix', NULL, FALSE ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'sql_utf8mb4', TRUE, FALSE ) );
|
||||
$form->addHeader( 'http_server' );
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'base_url', ( \IPS\Request::i()->isSecure() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . mb_substr( $_SERVER['SCRIPT_NAME'], 0, -mb_strlen( \IPS\CP_DIRECTORY . '/install/index.php' ) ), TRUE, array( 'size' => 50 ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'diagnostics_reporting', FALSE ) );
|
||||
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
/* Enforce UTF8MB4 */
|
||||
$values['sql_utf8mb4'] = TRUE;
|
||||
|
||||
try
|
||||
{
|
||||
try
|
||||
@@ -55,7 +57,7 @@ class _serverdetails extends \IPS\Dispatcher\Controller
|
||||
/* Connection Success, check MySQL version */
|
||||
$result = \IPS\core\Setup\Upgrade::mysqlRequirements( $db );
|
||||
|
||||
if( !$result['requirements']['MySQL']['version']['success'] )
|
||||
if( !$result['requirements']['MySQL']['version']['success'] AND !\IPS\CIC )
|
||||
{
|
||||
throw new \DomainException( $result['requirements']['MySQL']['version']['message'] );
|
||||
}
|
||||
@@ -95,11 +97,6 @@ class _serverdetails extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
catch ( \UnderflowException $e ) { }
|
||||
|
||||
if ( $values['sql_utf8mb4'] and version_compare( $db->server_info, '5.5.3', '<' ) )
|
||||
{
|
||||
throw new \DomainException( \IPS\Member::loggedIn()->language()->addToStack('err_no_utf8mb4') );
|
||||
}
|
||||
|
||||
$INFO = NULL;
|
||||
require \IPS\ROOT_PATH . '/conf_global.php';
|
||||
$INFO = array_merge( $INFO, $values );
|
||||
@@ -111,7 +108,7 @@ class _serverdetails extends \IPS\Dispatcher\Controller
|
||||
if ( \file_put_contents( \IPS\ROOT_PATH . '/conf_global.php', $toWrite ) )
|
||||
{
|
||||
/* PHP 5.6 - clear opcode cache or details won't be seen on next page load */
|
||||
if ( function_exists( 'opcache_invalidate' ) )
|
||||
if ( \function_exists( 'opcache_invalidate' ) )
|
||||
{
|
||||
@opcache_invalidate( \IPS\ROOT_PATH . '/conf_global.php' );
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\modules\setup\install;
|
||||
|
||||
/* 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;
|
||||
@@ -30,7 +30,7 @@ class _systemcheck extends \IPS\Dispatcher\Controller
|
||||
public function manage()
|
||||
{
|
||||
/* Clear previous session data */
|
||||
if( !isset( \IPS\Request::i()->sessionCheck ) AND count( $_SESSION ) )
|
||||
if( !isset( \IPS\Request::i()->sessionCheck ) AND \count( $_SESSION ) )
|
||||
{
|
||||
foreach( $_SESSION as $k => $v )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user