Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

@@ -2,9 +2,9 @@
/**
* @brief Terms of Use
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @since 25 Sept 2013
* @version SVN_VERSION_NUMBER
*/
@@ -37,4 +37,41 @@ class _terms extends \IPS\Dispatcher\Controller
\IPS\Output::i()->bodyClasses[] = 'ipsLayout_minimal';
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'system' )->terms();
}
/**
* Dismiss Terms
*
* @return void
*/
protected function dismiss()
{
\IPS\Request::i()->setCookie( 'guestTermsDismissed', 1, NULL, FALSE );
if ( \IPS\Request::i()->isAjax() )
{
\IPS\Output::i()->json( array( 'message' => \IPS\Member::loggedIn()->language()->addToStack( 'terms_dismissed' ) ) );
}
else
{
if ( isset( \IPS\Request::i()->ref ) )
{
try
{
$url = \IPS\Http\Url::createFromString( base64_decode( \IPS\Request::i()->ref ) );
}
catch( \IPS\Http\Url\Exception $e )
{
$url = NULL;
}
if ( $url instanceof \IPS\Http\Url\Internal )
{
\IPS\Output::i()->redirect( $url, 'terms_dismissed' );
}
}
/* Still here? Just redirect to the index */
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( '' ), 'terms_dismissed' );
}
}
}