Version 3.2.3

This commit is contained in:
Neo committed 2025-12-19 00:34:03 -08:00
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
* Profile AJAX Ignored User methods
* Last Updated: $Date: 2010-10-05 21:26:08 -0400 (Tue, 05 Oct 2010) $
* Last Updated: $Date: 2011-09-13 21:55:41 -0400 (Tue, 13 Sep 2011) $
* </pre>
*
* @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 Thursday 26th June 2008
* @version $Revision: 6945 $
* @version $Revision: 9487 $
*
*/
@@ -30,7 +30,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
/**
* Messenger library
*
* @access protected
* @var object
*/
protected $messengerFunctions;
@@ -38,9 +37,8 @@ class public_members_ajax_messenger extends ipsAjaxCommand
/**
* Class entry point
*
* @access public
* @param object Registry reference
* @return void [Outputs to screen]
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
@@ -76,15 +74,68 @@ class public_members_ajax_messenger extends ipsAjaxCommand
break;
case 'archiveConversation':
$this->_archiveConversation();
break;
case 'getInboxDropDown':
$this->_getInboxDropDown();
break;
case 'sigCloseMenu':
$this->_sigCloseMenu();
break;
default:
break;
}
}
protected function _sigCloseMenu()
{
$this->lang->loadLanguageFile( array( 'public_topic', 'public_mod' ), 'forums' );
$msgid = intval( $this->request['msgid'] );
/* Fetch post */
$msg = $this->messengerFunctions->fetchMessageDataById( $msgid, true );
if ( $this->messengerFunctions->canAccessTopic( $this->memberData['member_id'], $msg['msg_topic_id'] ) )
{
return $this->returnHtml( $this->registry->output->getTemplate('topic')->ajaxSigCloseMenu( $msg ) );
}
else
{
$this->returnJsonError( 'nopermission' );
}
}
/**
* Shows the last 10 Pms or whatever.
*
* @return string HTML to be returned via ajax
* @since IPB 3.1.0.2011-03-24
*/
protected function _getInboxDropDown()
{
if ( ! $this->messengerFunctions->canUsePMSystem( $this->memberData ) )
{
$this->returnJsonError( 'cannotUsePMSystem' );
}
$this->lang->loadLanguageFile( array( 'public_messaging' ), 'members' );
/* Alright. Fetch the last 10 */
//$this->messengerFunctions->addFolderFilter('myconvo');
$topics = $this->messengerFunctions->getPersonalTopicsList( $this->memberData['member_id'], 'myconvo', array( 'sort' => 'date', 'offsetStart' => 0, 'offsetEnd' => 10 ) );
$topics = ( ! is_array( $topics ) ) ? array() : $topics;
/* reset */
$this->messengerFunctions->resetMembersAlertCounts( $this->memberData );
$this->returnJsonArray( array( 'html' => $this->cleanOutput( $this->registry->output->getTemplate('global_other')->inboxList( $topics ) ) ) );
}
/**
* Archives the conversation
*
* @access protected
* @return string HTML to be returned via ajax
* @since IPB 3.1.2.2010-07-07
*/
@@ -157,7 +208,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
/**
* Sends the PM
*
* @access protected
* @return string HTML to be returned via ajax
* @since IPB 3.0.0.2008-06-25
*/
@@ -176,8 +226,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
$msgContent = $this->convertHtmlEntities( $this->convertUnicode( $_POST['Post'] ) );
$msgTitle = IPSText::parseCleanValue( $this->convertHtmlEntities( $this->convertUnicode( $_POST['subject'] ) ) );
$this->request['Post'] = IPSText::parseCleanValue( $_POST['Post'] );
$_trackMsg = intval( $this->request['trackMsg'] );
$_addToSent = intval( $this->request['addToSent'] );
//-----------------------------------------
// Check viewing permissions, etc
@@ -198,12 +246,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
$this->returnJsonError( 'cannotUsePMSystem' );
}
//-----------------------------------------
// Reset Classes
//-----------------------------------------
IPSText::resetTextClass('editor');
//-----------------------------------------
// Load lang file
//-----------------------------------------
@@ -227,12 +269,7 @@ class public_members_ajax_messenger extends ipsAjaxCommand
try
{
$this->messengerFunctions->sendNewPersonalTopic( $toMemberID, $this->memberData['member_id'], array(), $msgTitle, $msgContent, array( 'origMsgID' => 0,
'fromMsgID' => 0,
'postKey' => md5(microtime()),
'trackMsg' => $_trackMsg,
'addToSentFolder' => $_addToSent,
'hideCCUser' => 0 ) );
$this->messengerFunctions->sendNewPersonalTopic( $toMemberID, $this->memberData['member_id'], array(), $msgTitle, $msgContent );
return $this->returnJsonArray( array( 'status' => 'sent' ) );
}
@@ -267,7 +304,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
/**
* Shows the quick PM form
*
* @access protected
* @return string HTML to be returned via ajax
* @since IPB 3.0.0.2008-06-25
*/
@@ -326,7 +362,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
/**
* Returns PM notification
*
* @access protected
* @return string JSON either error or status
* @since IPB 3.0.0.2008-06-25
*/
@@ -397,7 +432,7 @@ class public_members_ajax_messenger extends ipsAjaxCommand
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $msg['mgroup_others'];
$msg['msg_post'] = IPSText::getTextClass('bbcode')->stripAllTags( strip_tags( str_replace( '<br />', "\n", $msg['msg_post'] ) ) );
$msg['msg_post'] = IPSText::getTextClass('bbcode')->wordWrap( $msg['msg_post'], 50, "\n" );
$msg['msg_post'] = wordwrap( $msg['msg_post'], 50, "\n" );
if ( IPSText::mbstrlen( $msg['msg_post'] ) > 300 )
{
@@ -438,7 +473,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
/**
* Empties a folder
*
* @access protected
* @return string JSON either error or status
* @since IPB 3.0.0.2008-06-25
*/
@@ -529,7 +563,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
/**
* Renames a folder
*
* @access protected
* @return string JSON either error or status
* @since IPB 3.0.0.2008-06-25
*/
@@ -611,7 +644,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
/**
* Removes a folder
*
* @access protected
* @return string JSON either error or status
* @since IPB 3.0.0.2008-06-25
*/
@@ -669,11 +701,31 @@ class public_members_ajax_messenger extends ipsAjaxCommand
//-----------------------------------------
// .. and it has no messages
// Change May 9 2011 - JS alert already warns that
// all messages in folder will be deleted, so just empty and delete
// @link http://community.invisionpower.com/tracker/issue-29857-cannot-delete-pm-folder
//-----------------------------------------
if ( $folders[ $folderID ]['count'] > 0 )
//if ( $folders[ $folderID ]['count'] > 0 )
//{
// $this->returnJsonError( 'cannotDeleteHasMessages' );
//}
$messages = $this->messengerFunctions->getPersonalTopicsList( $memberID, $folderID, array( 'offsetStart' => 0, 'offsetEnd' => 100000 ) );
/* Just grab IDs */
$mtids = array_keys( $messages );
try
{
$this->returnJsonError( 'cannotDeleteHasMessages' );
$this->messengerFunctions->deleteTopics( $memberData['member_id'], $mtids );
}
catch( Exception $error )
{
if( $error->getMessage() != 'NO_IDS_TO_DELETE' )
{
$this->returnJsonError( $error->getMessage() );
}
}
//-----------------------------------------
@@ -704,7 +756,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
/**
* Adds a folder
*
* @access protected
* @return string JSON either error or status
* @since IPB 3.0.0.2008-06-25
*/