Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Online list
|
||||
* Last Updated: $Date: 2010-09-14 05:48:02 -0400 (Tue, 14 Sep 2010) $
|
||||
* Last Updated: $Date: 2011-07-11 21:16:52 -0400 (Mon, 11 Jul 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: terabyte $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 12th March 2002
|
||||
* @version $Revision: 6865 $
|
||||
* @version $Revision: 9201 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -31,31 +31,27 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Page title
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $_title;
|
||||
protected $_title;
|
||||
|
||||
/**
|
||||
* Navigation
|
||||
*
|
||||
* @access private
|
||||
* @var array[ 0 => [ title, url ] ]
|
||||
*/
|
||||
private $_navigation;
|
||||
protected $_navigation;
|
||||
|
||||
/**
|
||||
* Folder totals
|
||||
*
|
||||
* @access private
|
||||
* @var mixed
|
||||
*/
|
||||
private $_totals;
|
||||
protected $_totals;
|
||||
|
||||
/**
|
||||
* Contains topic participant data
|
||||
*
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $_topicParticipants;
|
||||
@@ -63,7 +59,6 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Messenger library
|
||||
*
|
||||
* @access public
|
||||
* @var object
|
||||
*/
|
||||
public $messengerFunctions;
|
||||
@@ -71,7 +66,6 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Error string
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $_errorString = '';
|
||||
@@ -79,9 +73,8 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen/redirects]
|
||||
* @return @e void [Outputs to screen/redirects]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -94,7 +87,7 @@ class public_members_messaging_view extends ipsCommand
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10226, null, null, 403 );
|
||||
}
|
||||
|
||||
if ( $this->memberData['members_disable_pm'] )
|
||||
if ( $this->memberData['members_disable_pm'] == 2)
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10227, null, null, 403 );
|
||||
}
|
||||
@@ -108,6 +101,9 @@ class public_members_messaging_view extends ipsCommand
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10227, null, null, 404 );
|
||||
}
|
||||
|
||||
/* Print CSS */
|
||||
$this->registry->output->addToDocumentHead( 'raw', "<link rel='stylesheet' type='text/css' title='Main' media='print' href='{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_print.css' />" );
|
||||
|
||||
//-----------------------------------------
|
||||
// Language
|
||||
@@ -133,6 +129,11 @@ class public_members_messaging_view extends ipsCommand
|
||||
$this->messengerFunctions->addFolderFilter( $this->request['folderFilter'] );
|
||||
}
|
||||
|
||||
/* force disabled messenger into default */
|
||||
if ( $this->memberData['members_disable_pm'] && $this->request['do'] != 'enableMessenger' )
|
||||
{
|
||||
$this->request['do'] = 'inbox';
|
||||
}
|
||||
//-----------------------------------------
|
||||
// What to do?
|
||||
//-----------------------------------------
|
||||
@@ -175,6 +176,12 @@ class public_members_messaging_view extends ipsCommand
|
||||
case 'toggleNotifications':
|
||||
$html = $this->_toggleNotifications();
|
||||
break;
|
||||
case 'enableMessenger':
|
||||
$this->_enableMessenger();
|
||||
break;
|
||||
case 'disableMessenger':
|
||||
$this->_disableMessenger();
|
||||
break;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -197,14 +204,56 @@ class public_members_messaging_view extends ipsCommand
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable messenger
|
||||
*/
|
||||
protected function _enableMessenger()
|
||||
{
|
||||
$authKey = $this->request['authKey'];
|
||||
|
||||
/* Auth key */
|
||||
if ( $this->request['authKey'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024, null, null, 403 );
|
||||
}
|
||||
|
||||
/* Toggle */
|
||||
if ( $this->memberData['members_disable_pm'] != 2 )
|
||||
{
|
||||
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'members_disable_pm' => 0 ) ) );
|
||||
}
|
||||
|
||||
$this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . 'app=members&module=messaging' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable messenger
|
||||
*/
|
||||
protected function _disableMessenger()
|
||||
{
|
||||
$authKey = $this->request['authKey'];
|
||||
|
||||
/* Auth key */
|
||||
if ( $this->request['authKey'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024, null, null, 403 );
|
||||
}
|
||||
|
||||
/* Toggle */
|
||||
if ( $this->memberData['members_disable_pm'] != 2 )
|
||||
{
|
||||
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'members_disable_pm' => 1 ) ) );
|
||||
}
|
||||
|
||||
$this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . 'app=members&module=messaging' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Block a participant
|
||||
*
|
||||
* @access private
|
||||
* @return mixed void, or HTML
|
||||
*/
|
||||
private function _toggleNotifications()
|
||||
protected function _toggleNotifications()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -244,10 +293,9 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Block a participant
|
||||
*
|
||||
* @access private
|
||||
* @return mixed void, or HTML
|
||||
*/
|
||||
private function _blockParticipant()
|
||||
protected function _blockParticipant()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -288,10 +336,9 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Leave a conversation (non topic starter)
|
||||
*
|
||||
* @access private
|
||||
* @return mixed void, or HTML
|
||||
*/
|
||||
private function _unblockParticipant()
|
||||
protected function _unblockParticipant()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -332,10 +379,9 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Leave a conversation (non topic starter)
|
||||
*
|
||||
* @access private
|
||||
* @return mixed void, or HTML
|
||||
*/
|
||||
private function _deleteConversation()
|
||||
protected function _deleteConversation()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -376,10 +422,9 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Deletes a reply
|
||||
*
|
||||
* @access private
|
||||
* @return mixed void, or HTML
|
||||
*/
|
||||
private function _addParticipants()
|
||||
protected function _addParticipants()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -439,6 +484,7 @@ class public_members_messaging_view extends ipsCommand
|
||||
$_msgString = str_replace( '#NAMES#' , implode( ",", $this->messengerFunctions->exceptionData ), $_msgString );
|
||||
$_msgString = str_replace( '#TONAME#' , implode( ",", $inviteUsers), $_msgString );
|
||||
$_msgString = str_replace( '#FROMNAME#', $this->memberData['members_display_name'], $_msgString );
|
||||
$_msgString = str_replace( '#LIMIT#' , $this->memberData['g_max_mass_pm'], $_msgString );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -454,7 +500,6 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Redirects the user to the correct page in a conversation based on the incoming msg ID
|
||||
*
|
||||
* @access protected
|
||||
* @return string returns HTML
|
||||
*/
|
||||
protected function _findMessage()
|
||||
@@ -512,10 +557,9 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Multi Files Messages
|
||||
*
|
||||
* @access private
|
||||
* @return string returns HTML
|
||||
*/
|
||||
private function _multiFile()
|
||||
protected function _multiFile()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -620,7 +664,6 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Show a message
|
||||
*
|
||||
* @access public
|
||||
* @return string returns HTML
|
||||
*/
|
||||
public function showConversation()
|
||||
@@ -668,7 +711,16 @@ class public_members_messaging_view extends ipsCommand
|
||||
// Add to the topic data...
|
||||
//-----------------------------------------
|
||||
|
||||
$conversationData['topicData']['_canReply'] = $this->messengerFunctions->canReplyTopic( $this->memberData['member_id'], $conversationData['topicData'], $conversationData['memberData'] );
|
||||
$conversationData['topicData']['_canReply'] = $this->messengerFunctions->canReplyTopic( $this->memberData['member_id'], $conversationData['topicData'], $conversationData['memberData'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check report permissions
|
||||
//-----------------------------------------
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportLibrary.php', 'reportLibrary', 'core' );
|
||||
$reports = new $classToLoad( $this->registry );
|
||||
|
||||
$conversationData['topicData']['_canReport'] = $reports->canReport( 'messages' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Pages
|
||||
@@ -677,6 +729,7 @@ class public_members_messaging_view extends ipsCommand
|
||||
$conversationData['topicData']['_pages'] = $this->registry->output->generatePagination( array( 'totalItems' => $conversationData['topicData']['mt_replies'] + 1,
|
||||
'itemsPerPage' => $end,
|
||||
'currentStartValue' => $start,
|
||||
'showNumbers' => false,
|
||||
'baseUrl' => "app=members&module=messaging&section=view&do=showConversation&topicID=".$topicID."&sort=".$this->request['sort'] ) );
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -704,11 +757,10 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Show the folder list
|
||||
*
|
||||
* @access private
|
||||
* @param string Any error text
|
||||
* @return string returns HTML
|
||||
*/
|
||||
private function _showFolder( $error='' )
|
||||
protected function _showFolder( $error='' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -761,6 +813,7 @@ class public_members_messaging_view extends ipsCommand
|
||||
$pages = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $totalMsg,
|
||||
'itemsPerPage' => $p_end,
|
||||
'currentStartValue' => $start,
|
||||
'showNumbers' => false,
|
||||
'baseUrl' => $_baseURL ) );
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
Reference in new issue
Block a user