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\front\system;
|
||||
|
||||
/* 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;
|
||||
@@ -146,7 +146,7 @@ class _warnings extends \IPS\Content\Controller
|
||||
/* Display */
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'front_modcp.js', 'core' ) );
|
||||
$actions = \IPS\Db::i()->select( '*', 'core_members_warn_actions', NULL, 'wa_points ASC' );
|
||||
if ( count( $actions ) )
|
||||
if ( \count( $actions ) )
|
||||
{
|
||||
$min = NULL;
|
||||
foreach ( $actions as $a )
|
||||
@@ -161,7 +161,7 @@ class _warnings extends \IPS\Content\Controller
|
||||
$form->addSidebar( \IPS\Theme::i()->getTemplate( 'modcp' )->warnActions( $actions, $member, $min ) );
|
||||
}
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('warn_member', FALSE, array( 'sprintf' => array( $member->name ) ) );
|
||||
\IPS\Output::i()->output = $form->customTemplate( array( call_user_func_array( array( \IPS\Theme::i(), 'getTemplate' ), array( 'forms', 'core' ) ), 'popupTemplate' ) );
|
||||
\IPS\Output::i()->output = $form->customTemplate( array( \IPS\Theme::i()->getTemplate( 'forms', 'core' ), 'popupTemplate' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -202,17 +202,14 @@ class _warnings extends \IPS\Content\Controller
|
||||
$member->save();
|
||||
|
||||
/* Redirect */
|
||||
if ( isset( $_SERVER['HTTP_REFERER'] ) )
|
||||
if ( $redirectTo = \IPS\Request::i()->referrer() )
|
||||
{
|
||||
$url = \IPS\Http\Url\Friendly::createFromString( $_SERVER['HTTP_REFERER'] );
|
||||
if ( $url instanceof \IPS\Http\Url\Internal and !$url->openRedirect() )
|
||||
{
|
||||
\IPS\Output::i()->redirect( $url );
|
||||
return;
|
||||
}
|
||||
\IPS\Output::i()->redirect( $redirectTo );
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Output::i()->redirect( $warning->url() );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( $warning->url() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user