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,26 +11,36 @@
|
||||
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\core\Setup\Install;
|
||||
use IPS\Dispatcher\Controller;
|
||||
use IPS\Member;
|
||||
use IPS\Output;
|
||||
use IPS\Request;
|
||||
use IPS\Theme;
|
||||
use function count;
|
||||
use function defined;
|
||||
|
||||
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: System Check
|
||||
*/
|
||||
class _systemcheck extends \IPS\Dispatcher\Controller
|
||||
class systemcheck extends Controller
|
||||
{
|
||||
/**
|
||||
* Show Form
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function manage()
|
||||
public function manage() : void
|
||||
{
|
||||
/* Clear previous session data */
|
||||
if( !isset( \IPS\Request::i()->sessionCheck ) AND \count( $_SESSION ) )
|
||||
if( !isset( Request::i()->sessionCheck ) AND count( $_SESSION ) )
|
||||
{
|
||||
foreach( $_SESSION as $k => $v )
|
||||
{
|
||||
@@ -39,20 +49,20 @@ class _systemcheck extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
|
||||
/* Store a session variable and then check it on the next page load to make sure PHP sessions are working */
|
||||
if( !isset( \IPS\Request::i()->sessionCheck ) )
|
||||
if( !isset( Request::i()->sessionCheck ) )
|
||||
{
|
||||
$_SESSION['sessionCheck'] = TRUE;
|
||||
\IPS\Output::i()->redirect( \IPS\Request::i()->url()->setQueryString( 'sessionCheck', 1 ) );
|
||||
Output::i()->redirect( Request::i()->url()->setQueryString( 'sessionCheck', 1 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !isset( $_SESSION['sessionCheck'] ) OR !$_SESSION['sessionCheck'] )
|
||||
{
|
||||
\IPS\Output::i()->error( 'session_check_fail', '5C348/1', 500, '' );
|
||||
Output::i()->error( 'session_check_fail', '5C348/1', 500, '' );
|
||||
}
|
||||
}
|
||||
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('healthcheck');
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->healthcheck( \IPS\core\Setup\Install::systemRequirements() );
|
||||
Output::i()->title = Member::loggedIn()->language()->addToStack('healthcheck');
|
||||
Output::i()->output = Theme::i()->getTemplate( 'global' )->healthcheck( Install::systemRequirements() );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user