Version 2.2.2
This commit is contained in:
1 parent
22f1b963ee
commit
a3bb603c96
858 files changed
+479463
-188140
No files matched your search
@@ -2,18 +2,28 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-10-03 21:04:14 +0100 (Tue, 03 Oct 2006) $
|
||||
| > $Revision: 602 $
|
||||
| > $Author: bfarber $
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-12-04 10:31:02 -0600 (Mon, 04 Dec 2006) $
|
||||
| > $Revision: 757 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Messenger functions
|
||||
@@ -28,7 +38,7 @@
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -267,10 +277,28 @@ class messenger
|
||||
|
||||
function end_empty_folders()
|
||||
{
|
||||
$names = array( 'unsent' => $this->ipsclass->lang['fd_unsent'] );
|
||||
$ids = array();
|
||||
$qe = "";
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$md5check = $this->ipsclass->txt_md5_clean( $this->ipsclass->input['md5check'] );
|
||||
$names = array( 'unsent' => $this->ipsclass->lang['fd_unsent'] );
|
||||
$ids = array();
|
||||
$qe = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// Check MD5 auth key
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->ipsclass->md5_check )
|
||||
{
|
||||
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Do dir data dear dah-dag
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( $this->ipsclass->member['dir_data'] as $v )
|
||||
{
|
||||
$names[ $v['id'] ] = $v['real'];
|
||||
@@ -466,8 +494,35 @@ class messenger
|
||||
// Get the messages...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'msg_get_msg_archive', array( 'mid' => $this->ipsclass->member['id'], 'limit_b' => $this->ipsclass->input['number'], 'older_newer' => $older_newer, 'time_cut' => $time_cut, 'folder_query' => $folder_query ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
//$this->ipsclass->DB->cache_add_query( 'msg_get_msg_archive', array( 'mid' => $this->ipsclass->member['id'], 'limit_b' => $this->ipsclass->input['number'], 'older_newer' => $older_newer, 'time_cut' => $time_cut, 'folder_query' => $folder_query ) );
|
||||
//$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 'mt.*',
|
||||
'from' => array( 'message_topics' => 'mt' ),
|
||||
'where' => "mt.mt_owner_id={$this->ipsclass->member['id']} AND mt.mt_date {$older_newer} {$time_cut} {$folder_query}",
|
||||
'limit' => array( 0, $this->ipsclass->input['number'] ),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'msg.msg_post',
|
||||
'from' => array( 'message_text' => 'msg' ),
|
||||
'where' => 'msg.msg_id=mt.mt_msg_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
array(
|
||||
'select' => 'm.members_display_name, m.id',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.id=mt.mt_from_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
array(
|
||||
'select' => 'mm.members_display_name as to_name',
|
||||
'from' => array( 'members' => 'mm' ),
|
||||
'where' => 'mm.id=mt.mt_to_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
),
|
||||
) );
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
//-----------------------------------------
|
||||
// Repeat after me..
|
||||
@@ -486,7 +541,15 @@ class messenger
|
||||
|
||||
$info['msg_date'] = $this->ipsclass->get_date( $r['mt_date'], 'LONG' );
|
||||
$info['msg_title'] = $r['mt_title'];
|
||||
$info['msg_sender'] = $r['members_display_name'];
|
||||
|
||||
if( $r['mt_vid_folder'] == 'sent' )
|
||||
{
|
||||
$info['msg_sender'] = $r['to_name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$info['msg_sender'] = $r['members_display_name'];
|
||||
}
|
||||
|
||||
$info['msg_content'] = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $r['msg_post'] ) );
|
||||
|
||||
@@ -1348,6 +1411,7 @@ class messenger
|
||||
$this->topiclib->parser->parse_html = $this->ipsclass->vars['msg_allow_html'];
|
||||
$this->topiclib->parser->parse_bbcode = $this->ipsclass->vars['msg_allow_code'];
|
||||
$this->topiclib->parser->parse_nl2br = 1;
|
||||
$this->topiclib->parser->parsing_signature = 0;
|
||||
|
||||
$msg['msg_post'] = $this->topiclib->parser->pre_display_parse( $this->topiclib->parser->pre_db_parse( $msg['msg_post'] ) );
|
||||
|
||||
@@ -1357,7 +1421,7 @@ class messenger
|
||||
$this->topiclib->parser->parse_html = $this->ipsclass->vars['sig_allow_html'];
|
||||
$this->topiclib->parser->parse_bbcode = $this->ipsclass->vars['sig_allow_ibc'];
|
||||
|
||||
$member['signature'] = $this->topiclib->parser->pre_display_parse( $this->topiclib->parser->pre_db_parse( $member['signature'] ) );
|
||||
$member['signature'] = $this->topiclib->parser->pre_display_parse( $member['signature'] );
|
||||
$member['signature'] = $this->ipsclass->compiled_templates['skin_global']->signature_separator($member['signature']);
|
||||
}
|
||||
else
|
||||
@@ -1691,9 +1755,9 @@ class messenger
|
||||
$info['img_width'] = 300;
|
||||
}
|
||||
|
||||
if ($total['msg_total'] >=$this->ipsclass->member['g_max_messages'])
|
||||
if ($total_current['msg_total'] >=$this->ipsclass->member['g_max_messages'])
|
||||
{
|
||||
$info['full_messenger'] = "<span class='highlight'>".$this->ipsclass->lang['folders_full']."</span>";
|
||||
$info['full_messenger'] = "<span class='highlight'>".$this->ipsclass->lang['c_msg_full']."</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1705,12 +1769,12 @@ class messenger
|
||||
// Generate Pagination
|
||||
//-----------------------------------------
|
||||
|
||||
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
|
||||
$start = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0;
|
||||
$p_end = $this->ipsclass->vars['show_max_msg_list'] > 0 ? $this->ipsclass->vars['show_max_msg_list'] : 50;
|
||||
|
||||
if( $start*$p_end > $total_current['msg_total'] )
|
||||
if ( $start >= $total_current['msg_total'] )
|
||||
{
|
||||
$start = (floor($total_current['msg_total']/$p_end) - 1) * $p_end;
|
||||
$start = 0;
|
||||
}
|
||||
|
||||
$pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $total_current['msg_total'],
|
||||
|
||||
Reference in new issue
Block a user