Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -11,40 +11,52 @@
|
||||
namespace IPS\core\modules\setup\install;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
use IPS\Application;
|
||||
use IPS\core\FrontNavigation;
|
||||
use IPS\Dispatcher\Controller;
|
||||
use IPS\Member;
|
||||
use IPS\Output;
|
||||
use IPS\Settings;
|
||||
use IPS\Theme;
|
||||
use function defined;
|
||||
use function file_put_contents;
|
||||
use function function_exists;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Installer: Finished Screen
|
||||
*/
|
||||
class _done extends \IPS\Dispatcher\Controller
|
||||
class done extends Controller
|
||||
{
|
||||
/**
|
||||
* Finished
|
||||
*/
|
||||
public function manage()
|
||||
public function manage() : void
|
||||
{
|
||||
/* Reset theme maps to make sure bad data hasn't been cached by visits mid-setup */
|
||||
foreach( \IPS\Application::applications() as $app => $data )
|
||||
foreach( Application::applications() as $app => $data )
|
||||
{
|
||||
\IPS\Theme::deleteCompiledTemplate( $app);
|
||||
\IPS\Theme::deleteCompiledCss( $app );
|
||||
\IPS\Theme::deleteCompiledResources( $app );
|
||||
Theme::deleteCompiledTemplate( $app);
|
||||
Theme::deleteCompiledCss( $app );
|
||||
Theme::deleteCompiledResources( $app );
|
||||
}
|
||||
|
||||
\IPS\Output::clearJsFiles();
|
||||
Output::clearJsFiles();
|
||||
|
||||
/* Build default front navigation - if you visit ACP directly after it won't build, and you can run into issues */
|
||||
\IPS\core\FrontNavigation::i()->buildDefaultFrontNavigation();
|
||||
FrontNavigation::i()->buildDefaultFrontNavigation( true );
|
||||
|
||||
require \IPS\ROOT_PATH . '/conf_global.php';
|
||||
|
||||
\IPS\Settings::i()->changeValues( array( 'ipb_reg_number' => $INFO['lkey'], 'site_secret_key' => md5( $INFO['sql_pass'] . $INFO['base_url'] . $INFO['sql_database'] ) ) );
|
||||
Settings::i()->changeValues( array( 'ipb_reg_number' => $INFO['lkey'], 'site_secret_key' => md5( $INFO['sql_pass'] . $INFO['base_url'] . $INFO['sql_database'] ) ) );
|
||||
|
||||
\file_put_contents( \IPS\ROOT_PATH . '/conf_global.php', "<?php\n\n" . '$INFO = ' . var_export( array(
|
||||
file_put_contents( \IPS\ROOT_PATH . '/conf_global.php', "<?php\n\n" . '$INFO = ' . var_export( array(
|
||||
'sql_host' => $INFO['sql_host'],
|
||||
'sql_database' => $INFO['sql_database'],
|
||||
'sql_user' => $INFO['sql_user'],
|
||||
@@ -62,13 +74,13 @@ 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' );
|
||||
}
|
||||
|
||||
\IPS\Settings::i()->base_url = $INFO['base_url'];
|
||||
Settings::i()->base_url = $INFO['base_url'];
|
||||
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('done');
|
||||
Output::i()->title = Member::loggedIn()->language()->addToStack('done');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user