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
* Online list
* Last Updated: $Date: 2010-10-28 08:16:00 -0400 (Thu, 28 Oct 2010) $
* Last Updated: $Date: 2011-09-12 20:59:05 -0400 (Mon, 12 Sep 2011) $
* </pre>
*
* @author $Author: mmecham $
* @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: 7061 $
* @version $Revision: 9483 $
*
*/
@@ -31,7 +31,6 @@ class public_members_messaging_send extends ipsCommand
/**
* Page title
*
* @access protected
* @var string
*/
protected $_title;
@@ -39,7 +38,6 @@ class public_members_messaging_send extends ipsCommand
/**
* Navigation
*
* @access protected
* @var array[ 0 => [ title, url ] ]
*/
protected $_navigation;
@@ -47,7 +45,6 @@ class public_members_messaging_send extends ipsCommand
/**
* Post Key
*
* @access protected
* @var string Md5 key
*/
protected $_postKey;
@@ -55,7 +52,6 @@ class public_members_messaging_send extends ipsCommand
/**
* Flag: Can we upload?
*
* @access protected
* @var int 1 or 0
*/
protected $_canUpload;
@@ -63,7 +59,6 @@ class public_members_messaging_send extends ipsCommand
/**
* Error string
*
* @access protected
* @var string
*/
protected $_errorString = '';
@@ -71,9 +66,8 @@ class public_members_messaging_send 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 )
{
@@ -106,13 +100,12 @@ class public_members_messaging_send extends ipsCommand
//-----------------------------------------
IPSText::resetTextClass('bbcode');
IPSText::resetTextClass('editor');
//-----------------------------------------
// Load lang file
//-----------------------------------------
$this->registry->getClass( 'class_localization')->loadLanguageFile( array( "public_error", "public_editors" ), 'core' );
$this->registry->getClass( 'class_localization')->loadLanguageFile( array( "public_error" ), 'core' );
//-----------------------------------------
// Post Key
@@ -177,7 +170,7 @@ class public_members_messaging_send extends ipsCommand
//-----------------------------------------
// What to do?
//-----------------------------------------
switch( $this->request['do'] )
{
default:
@@ -227,8 +220,7 @@ class public_members_messaging_send extends ipsCommand
/**
* Deletes a reply
*
* @access protected
* @return void
* @return @e void
*/
protected function _deleteReply()
{
@@ -277,7 +269,6 @@ class public_members_messaging_send extends ipsCommand
/**
* Sends a reply
*
* @access protected
* @return mixed void, or HTML form
*/
protected function _sendReply()
@@ -293,7 +284,7 @@ class public_members_messaging_send extends ipsCommand
//-----------------------------------------
// Error checking
//-----------------------------------------
if ( IPSText::mbstrlen( trim( IPSText::br2nl( $_POST['msgContent'] ) ) ) < 2 )
{
return $this->_showForm( 'reply', $this->lang->words['err_no_msg'] );
@@ -326,6 +317,7 @@ class public_members_messaging_send extends ipsCommand
{
$_msgString = $this->lang->words[ 'err_' . $msg ];
$_msgString = str_replace( '#NAMES#' , implode( ",", $this->messengerFunctions->exceptionData ), $_msgString );
$_msgString = str_replace( '#LIMIT#' , $this->memberData['g_max_mass_pm'], $_msgString );
$_msgString = str_replace( '#TONAME#' , $this->messengerFunctions->exceptionData[0], $_msgString );
$_msgString = str_replace( '#FROMNAME#', $this->memberData['members_display_name'], $_msgString );
}
@@ -347,7 +339,6 @@ class public_members_messaging_send extends ipsCommand
/**
* Sends a reply
*
* @access protected
* @return mixed void, or HTML form
*/
protected function _sendEdit()
@@ -397,6 +388,7 @@ class public_members_messaging_send extends ipsCommand
{
$_msgString = $this->lang->words[ 'err_' . $msg ];
$_msgString = str_replace( '#NAMES#' , implode( ",", $this->messengerFunctions->exceptionData ), $_msgString );
$_msgString = str_replace( '#LIMIT#' , $this->memberData['g_max_mass_pm'], $_msgString );
$_msgString = str_replace( '#TONAME#' , $this->messengerFunctions->exceptionData[0], $_msgString );
$_msgString = str_replace( '#FROMNAME#', $this->memberData['members_display_name'], $_msgString );
}
@@ -418,8 +410,7 @@ class public_members_messaging_send extends ipsCommand
/**
* Sends the PM
*
* @access protected
* @return void, or HTML form
* @return @e void, or HTML form
*/
protected function _sendNewPersonalTopic()
{
@@ -452,7 +443,7 @@ class public_members_messaging_send extends ipsCommand
return $this->_showNewTopicForm( $this->lang->words['err_no_title'] );
}
if ( IPSText::mbstrlen( trim( IPSText::br2nl( $_POST['Post'] ) ) ) < 3 )
if ( IPSText::mbstrlen( trim( IPSText::br2nl( $msgContent ) ) ) < 3 )
{
return $this->_showNewTopicForm( $this->lang->words['err_no_msg'] );
}
@@ -511,7 +502,7 @@ class public_members_messaging_send extends ipsCommand
catch( Exception $error )
{
$msg = $error->getMessage();
if ( strstr( $msg, 'BBCODE_' ) )
{
$msg = str_replace( 'BBCODE_', '', $msg );
@@ -522,6 +513,7 @@ class public_members_messaging_send extends ipsCommand
{
$_msgString = $this->lang->words[ 'err_' . $msg ];
$_msgString = str_replace( '#NAMES#' , implode( ",", $this->messengerFunctions->exceptionData ), $_msgString );
$_msgString = str_replace( '#LIMIT#' , $this->memberData['g_max_mass_pm'], $_msgString );
$_msgString = str_replace( '#TONAME#' , $toMember['members_display_name'] , $_msgString );
$_msgString = str_replace( '#FROMNAME#', $this->memberData['members_display_name'], $_msgString );
$_msgString = str_replace( '#DATE#' , $this->messengerFunctions->exceptionData[0], $_msgString );
@@ -533,7 +525,7 @@ class public_members_messaging_send extends ipsCommand
return $this->_showNewTopicForm( $_msgString );
}
//-----------------------------------------
// Swap and serve...
//-----------------------------------------
@@ -554,7 +546,6 @@ class public_members_messaging_send extends ipsCommand
/**
* Show PM form
*
* @access protected
* @param string Type of form (edit / reply)
* @param string Error message
* @return string returns HTML
@@ -598,6 +589,14 @@ class public_members_messaging_send extends ipsCommand
$this->registry->getClass('output')->showError( 'messenger_no_msgid', 10229, null, null, 403 );
}
//-----------------------------------------
// Load editor
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' );
$_editor = new $classToLoad();
$_editor->setAllowHtml( $this->memberData['g_dohtml'] );
//-----------------------------------------
// Got a message ID?
//-----------------------------------------
@@ -611,45 +610,29 @@ class public_members_messaging_send extends ipsCommand
if ( $type == 'reply' )
{
/* We're quoting a post... */
if ( IPSText::getTextClass( 'editor' )->method == 'rte' )
if ( $_editor->getRteEnabled() )
{
$displayData['message'] = "[quote name='".IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($msgData['members_display_name'])."' timestamp='" . $msgData['msg_date'] . "']<br />{$msgData['msg_post']}".'[/quote]'."<br /><br /><br />";
$displayData['message'] = "[quote name='".IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($msgData['members_display_name'])."' timestamp='" . $msgData['msg_date'] . "']<br />{$msgData['msg_post']}".'[/quote]'."<br />";
}
else
{
IPSText::getTextClass('bbcode')->parse_html = $this->settings['msg_allow_html'];
IPSText::getTextClass('bbcode')->parse_html = $this->memberData['g_dohtml'];
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parse_smilies = 1;
IPSText::getTextClass('bbcode')->parse_bbcode = $this->settings['msg_allow_code'];
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'pms';
$msgData['msg_post'] = IPSText::getTextClass('bbcode')->preEditParse( $msgData['msg_post'] );
$displayData['message'] = "[quote name='".IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($msgData['members_display_name'])."' timestamp='" . $msgData['msg_date'] . "']\n{$msgData['msg_post']}".'[/quote]'."\n\n\n";
$displayData['message'] = "[quote name='".IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($msgData['members_display_name'])."' timestamp='" . $msgData['msg_date'] . "']\n{$msgData['msg_post']}".'[/quote]'."\n";
}
}
else if ( $type == 'edit' )
{
if ( IPSText::getTextClass('editor')->method == 'rte' )
{
IPSText::getTextClass('bbcode')->parse_wordwrap = 0;
IPSText::getTextClass('bbcode')->parse_html = 0;
$displayData['message'] = IPSText::getTextClass('bbcode')->convertForRTE( $msgData['msg_post'] );
/* Reset post key */
$this->_postKey = $msgData['msg_post_key'];
/* Reset post key */
$this->_postKey = $msgData['msg_post_key'];
}
else
{
IPSText::getTextClass('bbcode')->parse_html = $this->settings['msg_allow_html'];
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parse_smilies = 1;
IPSText::getTextClass('bbcode')->parse_bbcode = $this->settings['msg_allow_code'];
IPSText::getTextClass('bbcode')->parsing_section = 'pms';
$displayData['message'] = IPSText::getTextClass('bbcode')->preEditParse( $msgData['msg_post'] );
}
$displayData['message'] = $msgData['msg_post'];
}
}
}
@@ -657,23 +640,23 @@ class public_members_messaging_send extends ipsCommand
//-----------------------------------------
// Previewing...
//-----------------------------------------
if ( $preview )
{
/* Grab language for attachment previews */
$this->registry->getClass( 'class_localization')->loadLanguageFile( array( "public_topic" ), 'forums' );
IPSText::getTextClass('bbcode')->parse_html = $this->settings['msg_allow_html'];
IPSText::getTextClass('bbcode')->parse_html = $this->memberData['g_dohtml'];
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parse_smilies = 1;
IPSText::getTextClass('bbcode')->parse_bbcode = $this->settings['msg_allow_code'];
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'pms';
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $this->memberData['member_group_id'];
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $this->memberData['mgroup_others'];
$this->settings['max_emos'] = 0;
$msg = IPSText::getTextClass('editor')->processRawPost( 'Post-NS' );
$msg = $_editor->process( $_POST['Post-NS'] );
$msg = IPSText::getTextClass('bbcode')->preDisplayParse( IPSText::getTextClass('bbcode')->preDbParse( $msg ) );
if ( ! is_object( $this->class_attach ) )
@@ -725,27 +708,10 @@ class public_members_messaging_send extends ipsCommand
if ( $preview )
{
$displayData['message'] = ( $displayData['message'] ) ? $displayData['message'] : $_POST['Post-NS'];
}
//-----------------------------------------
// Is this RTE? If so, convert BBCode
//-----------------------------------------
}
if ( IPSText::getTextClass('editor')->method == 'rte' AND $displayData['message'] )
{
if ( $preview )
{
$displayData['message'] = stripslashes( $displayData['message'] );
}
$displayData['message'] = IPSText::getTextClass('bbcode')->convertForRTE( $displayData['message'] );
}
else if ( $displayData['message'] )
{
// Not needed as is handled in above $type == 'edit' block
}
$displayData['editor'] = IPSText::getTextClass('editor')->showEditor( $displayData['message'], 'msgContent' );
$_editor->setContent( $displayData['message'] );
$displayData['editor'] = $_editor->show( 'msgContent', array( 'height' => 350 ) );
//-----------------------------------------
// More Data...
@@ -792,7 +758,6 @@ class public_members_messaging_send extends ipsCommand
/**
* Show PM form
*
* @access protected
* @param string Error message
* @return string returns HTML
*/
@@ -829,6 +794,14 @@ class public_members_messaging_send extends ipsCommand
$_POST['Post-NS'] = isset($_POST['Post']) ? $_POST['Post'] : '';
$_POST['Post'] = IPSText::raw2form( isset($_POST['Post']) ? $_POST['Post'] : '' );
//-----------------------------------------
// Load editor
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' );
$_editor = new $classToLoad();
$_editor->setAllowHtml( $this->memberData['g_dohtml'] );
//-----------------------------------------
// Preview post?
//-----------------------------------------
@@ -838,10 +811,10 @@ class public_members_messaging_send extends ipsCommand
/* Grab language for attachment previews */
$this->registry->getClass( 'class_localization')->loadLanguageFile( array( "public_topic" ), 'forums' );
IPSText::getTextClass('bbcode')->parse_html = $this->settings['msg_allow_html'];
IPSText::getTextClass('bbcode')->parse_html = $this->memberData['g_dohtml'];
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parse_smilies = 1;
IPSText::getTextClass('bbcode')->parse_bbcode = $this->settings['msg_allow_code'];
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'pms';
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $this->memberData['member_group_id'];
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $this->memberData['mgroup_others'];
@@ -854,7 +827,7 @@ class public_members_messaging_send extends ipsCommand
}
else
{
$old_msg = IPSText::getTextClass('editor')->processRawPost( 'Post-NS' );
$old_msg = $_editor->process( $_POST['Post'] );
}
$old_msg = IPSText::getTextClass('bbcode')->preDisplayParse( IPSText::getTextClass('bbcode')->preDbParse( $old_msg ) );
@@ -955,13 +928,13 @@ class public_members_messaging_send extends ipsCommand
$_msg_id = $draftTopic['msg_id'];
$this->_postKey = $draftTopic['msg_post_key'];
IPSText::getTextClass('bbcode')->parse_html = $this->settings['msg_allow_html'];
IPSText::getTextClass('bbcode')->parse_html = $this->memberData['g_dohtml'];
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parse_smilies = 1;
IPSText::getTextClass('bbcode')->parse_bbcode = $this->settings['msg_allow_code'];
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'pms';
if ( IPSText::getTextClass('editor')->method == 'rte' )
if ( $_editor->getRteEnabled() )
{
$displayData['message'] = IPSText::getTextClass('bbcode')->convertForRTE( $draftTopic['msg_post'] );
}
@@ -1004,32 +977,10 @@ class public_members_messaging_send extends ipsCommand
}
}
}
//-----------------------------------------
// Remove side panel
//-----------------------------------------
IPSText::getTextClass('editor')->remove_side_panel = 1;
//-----------------------------------------
// PM returns
//-----------------------------------------
$_editor->setContent( $displayData['message'] );
if ( IPSText::getTextClass('editor')->method == 'rte' AND $displayData['message'] )
{
if ( count( $errors ) or $preview )
{
$displayData['message'] = IPSText::stripslashes( $displayData['message'] );
}
$displayData['message'] = IPSText::getTextClass('bbcode')->convertForRTE( $displayData['message'] );
}
else if ( $displayData['message'] )
{
$displayData['message'] = IPSText::getTextClass('bbcode')->preEditParse( $displayData['message'] );
}
$displayData['editor'] = IPSText::getTextClass('editor')->showEditor( $displayData['message'], 'Post' );
$displayData['editor'] = $_editor->show( 'Post', array( 'height' => 350 ) );
//-----------------------------------------
// More Data...