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 logs
* @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
* @subpackage Chat
* @since 15 Mar 2015
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief settings
* @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
* @subpackage Chat
* @since 15 Mar 2015
* @version SVN_VERSION_NUMBER
@@ -59,7 +59,7 @@ class _settings extends \IPS\Dispatcher\Controller
$times = explode( ',', \IPS\Settings::i()->ipschat_online );
/* Do we need to adjust the time zone? */
if( isset( $times[2] ) AND $times[2] != \IPS\Member::loggedIn()->timezone )
if( isset( $times[2] ) AND $times[2] AND $times[2] != \IPS\Member::loggedIn()->timezone )
{
$start = new \IPS\DateTime( '2015-01-01 ' . $times[0], new \DateTimeZone( $times[2] ) );
$start->setTimezone( new \DateTimeZone( \IPS\Member::loggedIn()->timezone ) );
@@ -2,9 +2,9 @@
/**
* @brief Action Controller
* @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
* @subpackage Chat
* @since 23 Mar 2015
* @version SVN_VERSION_NUMBER
@@ -42,6 +42,8 @@ class _action extends \IPS\Content\Controller
*/
protected function addUser()
{
\IPS\Session::i()->csrfCheck();
$member = \IPS\Member::load( intval( \IPS\Request::i()->id ) );
$map = array(
@@ -52,7 +54,7 @@ class _action extends \IPS\Content\Controller
'photo' => $member->photo,
'username' => $member->member_id ? $member->name : $member->loggedIn()->language()->get('guest'),
'formattedUsername' => \IPS\Member\Group::load( $member->member_group_id )->formatName( $member->name ),
'canBeIgnored' => $member->member_id ? !$member->group['gbw_cannot_be_ignored'] : 1,
'canBeIgnored' => !$member->canBeIgnored(),
'canBypassBadwords' => $member->group['g_bypass_badwords'],
'groupID' => $member->member_group_id,
'profileUrl' => $member->url(),
@@ -93,6 +95,8 @@ class _action extends \IPS\Content\Controller
*/
protected function blockUser()
{
\IPS\Session::i()->csrfCheck();
/* Make sure there is an ID */
if( !\IPS\Request::i()->id )
{
@@ -102,7 +106,7 @@ class _action extends \IPS\Content\Controller
/* Make sure we can ignore this user */
$user = \IPS\Member::load( \IPS\Request::i()->id );
if( $user->group['gbw_cannot_be_ignored'] )
if( !$user->canBeIgnored() )
{
\IPS\Output::i()->error( 'ipschat_no_ignore', '3H269/K', 403, '' );
}
@@ -134,6 +138,8 @@ class _action extends \IPS\Content\Controller
*/
protected function banUser()
{
\IPS\Session::i()->csrfCheck();
/* Make sure there is an ID */
if( !\IPS\Request::i()->id )
{
@@ -218,7 +224,7 @@ class _action extends \IPS\Content\Controller
'user_id' => $_thisRecord[0],
'username' => htmlspecialchars( $username, ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE ),
'forumUserID' => $member->member_id,
'canBeIgnored' => $member->member_id ? !$member->group['gbw_cannot_be_ignored'] : 1,
'canBeIgnored' => !$member->canBeIgnored(),
'canBypassBadwords' => $member->group['g_bypass_badwords'],
'groupID' => $member->member_group_id,
'prefix' => str_replace( '"', '__DBQ__', $member->group['prefix'] ),
+12 -8
View File
@@ -2,9 +2,9 @@
/**
* @brief View File Controller
* @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
* @subpackage Chat
* @since 10 Oct 2013
* @version SVN_VERSION_NUMBER
@@ -36,6 +36,11 @@ class _view extends \IPS\Content\Controller
*/
public function execute()
{
if ( time() > 1493596800 )
{
\IPS\Output::i()->error( 'ipschat_service_closed', '1H000/0', 503, 'ipschat_service_closed_admin' );
}
/* Check that the license allows access, etc. */
$licenseData = \IPS\IPS::licenseKey();
@@ -92,7 +97,6 @@ class _view extends \IPS\Content\Controller
/* Initiate output */
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'jquery/jquery.rangyinputs.js', 'core', 'interface' ) );
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'buzz/buzz.min.js', 'core', 'interface' ) );
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'esrever/esrever.js', 'chat', 'interface' ) );
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'front_chat.js', 'chat', 'front' ) );
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'chat.css', 'chat', 'front' ) );
@@ -181,12 +185,12 @@ class _view extends \IPS\Content\Controller
\IPS\Output::i()->error( 'chat_room_full', ( $key['chat_limit'] ? '1' : '4' ) . 'H269/B', 403, $key['chat_limit'] ? 'license_no_chat' : NULL );
break;
// Chat room full
// The chat room is on a server which is no longer online
case 7:
\IPS\Output::i()->error( 'generic_chatconnect_error', '5H269/A', 500, 'connect_gw_error_5' );
\IPS\Output::i()->error( 'generic_chatconnect_error', '5H269/M', 500, 'connect_gw_error_7' );
break;
// The chat room is on a server which is no longer online
// The chat room has no hostname associated with the server it is on; this would be a misconfiguration issue on the chat master server
case 8:
\IPS\Output::i()->error( 'generic_chatconnect_error', '5H268/4', 500, 'connect_gw_error_8' );
break;
@@ -218,7 +222,7 @@ class _view extends \IPS\Content\Controller
}
catch ( \IPS\Http\Request\Exception $e )
{
\IPS\Output::i()->error( 'generic_chatconnect_error', '4H268/2', 500, 'connect_gw_error_0' );
\IPS\Output::i()->error( 'generic_chatconnect_error', '4H269/N', 500, 'connect_gw_error_0' );
}
$results = explode( ',', $result );
@@ -309,7 +313,7 @@ class _view extends \IPS\Content\Controller
'username' => htmlspecialchars( $this->uncleanUsername( $username ), ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE ),
'formattedUsername' => \IPS\Member\Group::load( $member->member_group_id )->formatName( $member->name ),
'forumUserID' => $member->member_id,
'canBeIgnored' => $member->member_id ? !$member->group['gbw_cannot_be_ignored'] : 1,
'canBeIgnored' => !$member->canBeIgnored(),
'canBypassBadwords' => $member->group['g_bypass_badwords'],
'groupID' => $member->member_group_id,
'prefix' => str_replace( '"', '__DBQ__', $member->group['prefix'] ),