Version 2.3.6

This commit is contained in:
Neo committed 2025-12-19 00:26:08 -08:00
1 parent a3bb603c96
commit 19b38c7c74
764 files changed
+143731 -118164

No files matched your search

@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| Invision Power Board
| =============================================
| 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
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-10-11 07:55:47 -0500 (Wed, 11 Oct 2006) $
| > $Revision: 624 $
| > $Date: 2008-10-02 12:04:59 -0400 (Thu, 02 Oct 2008) $
| > $Revision: 2573 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -35,7 +25,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -172,46 +162,19 @@ class post_functions extends class_post
if( $this->ipsclass->member['id'] == 0 AND $this->ipsclass->vars['guest_captcha'] )
{
//-----------------------------------------
// Security code stuff
//-----------------------------------------
if( isset($this->ipsclass->input['fast_reply_used']) AND $this->ipsclass->input['fast_reply_used'] == 1 )
if ($this->ipsclass->vars['bot_antispam'])
{
$this->obj['post_errors'] = 'reg_code_enter';
$this->show_form();
return;
}
if ($this->ipsclass->input['imgid'] == "")
{
$this->obj['post_errors'] = 'err_reg_code';
$this->show_form();
return;
// Validate CAPTCHA
require_once( KERNEL_PATH . 'class_captcha.php' );
$captchaClass = new class_captcha( $this->ipsclass, $this->ipsclass->vars['bot_antispam_type'] );
if ( $captchaClass->validate() !== TRUE )
{
$this->obj['post_errors'] = 'err_reg_code';
$this->show_form();
return;
}
}
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'reg_antispam',
'where' => "regid='".trim($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['imgid']))."'"
) );
$this->ipsclass->DB->simple_exec();
if ( ! $row = $this->ipsclass->DB->fetch_row() )
{
$this->obj['post_errors'] = 'err_reg_code';
$this->show_form();
return;
}
if ( trim( $this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['captcha']) ) != $row['regcode'] )
{
$this->obj['post_errors'] = 'err_reg_code';
$this->show_form();
return;
}
$this->ipsclass->DB->do_delete( 'reg_antispam', "regid='".trim($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['imgid']))."'" );
}
$this->save_post();
@@ -254,7 +217,7 @@ class post_functions extends class_post
{
$this->topic['pinned'] = 1;
$this->moderate_log('Òåìà áûëà «ïîäíÿòà» ïðè îòâåòå', $this->topic['title']);
$this->moderate_log( $this->ipsclass->lang['modlogs_pinned'], $this->topic['title']);
}
}
else if ($this->ipsclass->input['mod_options'] == 'close')
@@ -263,7 +226,7 @@ class post_functions extends class_post
{
$this->topic['state'] = 'closed';
$this->moderate_log('Òåìà áûëà çàêðûòà ïðè îòâåòå', $this->topic['title']);
$this->moderate_log( $this->ipsclass->lang['modlogs_closed'], $this->topic['title']);
}
}
else if ($this->ipsclass->input['mod_options'] == 'move')
@@ -280,7 +243,7 @@ class post_functions extends class_post
$this->topic['pinned'] = 1;
$this->topic['state'] = 'closed';
$this->moderate_log('Òåìà áûëà «ïîäíÿòà» è çàêðûòà ïðè îòâåòå', $this->topic['title']);
$this->moderate_log( $this->ipsclass->lang['modlogs_pinclose'], $this->topic['title']);
}
}
}
@@ -342,10 +305,10 @@ class post_functions extends class_post
// Make sure we don't have too many images
//-----------------------------------------
$new_post = $this->parser->pre_edit_parse( $new_post );
$new_post = $this->parser->pre_db_parse( $new_post );
if( $this->parser->error )
$test_post = $this->parser->pre_edit_parse( $new_post );
$test_post = $this->parser->pre_db_parse( $test_post );
if ( $this->parser->error )
{
$this->obj['post_errors'] = 'merge_'.$this->parser->error;
$this->show_form($class);
@@ -399,7 +362,10 @@ class post_functions extends class_post
// board/forum/topic stats
//-----------------------------------------
$this->pf_update_forum_and_stats($this->topic['tid'], $this->topic['title'], 'reply');
if ( $this->obj['moderate'] != 1 and $this->obj['moderate'] != 3 AND $this->topic['approved'] == 1 )
{
$this->pf_update_forum_and_stats($this->topic['tid'], $this->topic['title'], 'reply');
}
//-----------------------------------------
// Get the correct number of replies
@@ -523,7 +489,7 @@ class post_functions extends class_post
$this->notify_new_topic_approval( $this->topic['tid'], $this->topic['title'], $this->topic['starter_name'], $this->post['pid'], 'reply' );
$page = floor( ($this->topic['posts'] + 1) / $this->ipsclass->vars['display_max_posts']);
$page = floor( $this->topic['posts'] / $this->ipsclass->vars['display_max_posts'] );
$page = $page * $this->ipsclass->vars['display_max_posts'];
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['moderate_post'], "showtopic={$this->topic['tid']}&st=$page" );
@@ -537,11 +503,14 @@ class post_functions extends class_post
//-----------------------------------------
// Check for subscribed topics
// Pass on the previous last post time of the topic
// XXPass on the previous last post time of the topic
// 12.26.2007 - we want to send email if the new post was
// made after the member's last visit...which should be
// last_activity minus session expiration
// to see if we need to send emails out
//-----------------------------------------
$this->topic_tracker( $this->topic['tid'], $this->post['post'], $poster_name, $this->last_post );
$this->topic_tracker( $this->topic['tid'], $this->post['post'], $poster_name, time() - $this->ipsclass->vars['session_expiration'] );
//-----------------------------------------
// Redirect them back to the topic
@@ -559,8 +528,25 @@ class post_functions extends class_post
}
else
{
$page = floor( ($this->topic['posts'] + 1) / $this->ipsclass->vars['display_max_posts']);
$posts = $this->topic['posts'] + 1;
if( $this->moderator['post_q'] OR $this->ipsclass->member['g_is_supmod'] )
{
$posts = $pcount + $qpcount;
}
if( ( $posts % $this->ipsclass->vars['display_max_posts'] ) == 0 )
{
$page = ( ($posts) / $this->ipsclass->vars['display_max_posts'] );
}
else
{
$page = ( ($posts) / $this->ipsclass->vars['display_max_posts'] );
$page = ceil($page) - 1;
}
$page = $page * $this->ipsclass->vars['display_max_posts'];
$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic={$this->topic['tid']}&st=$page&gopid={$this->post['pid']}&#entry{$this->post['pid']}");
}
}
@@ -576,6 +562,11 @@ class post_functions extends class_post
// Are we quoting posts?
//-----------------------------------------
if ( $this->han_editor->method != 'rte' )
{
$_POST['Post'] = str_replace( '&', '&amp;', $_POST['Post'] );
}
$raw_post = $this->check_multi_quote();
//-----------------------------------------