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

+46 -47
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| 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-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
| > $Date: 2008-04-21 17:32:17 -0400 (Mon, 21 Apr 2008) $
| > $Revision: 1249 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Moderation core module
@@ -39,7 +29,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();
}
@@ -218,6 +208,10 @@ class moderate
{
$this->trash_forum = $this->ipsclass->vars['forum_trash_can_use_mod'] ? $this->ipsclass->vars['forum_trash_can_id'] : 0;
}
else
{
$this->trash_forum = $this->ipsclass->vars['forum_trash_can_id'];
}
}
}
@@ -373,6 +367,8 @@ class moderate
$parser->parse_nl2br = 1;
$parser->parse_smilies = 0;
$parser->parse_bbcode = $this->ipsclass->vars['sig_allow_ibc'];
$this->ipsclass->load_language( 'lang_post' );
//-----------------------------------------
// Got anyfink?
@@ -479,7 +475,7 @@ class moderate
//-----------------------------------------
else
{
$this->ipsclass->input['signature'] = $parser->pre_db_parse( $this->ipsclass->input['signature'] );
$this->ipsclass->input['signature'] = $parser->pre_display_parse( $parser->pre_db_parse( $this->ipsclass->input['signature'] ) );
if ($parser->error != "")
{
@@ -513,20 +509,20 @@ class moderate
if ( $this->ipsclass->DB->get_num_rows() )
{
$this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_main_photo' => '',
'pp_main_width' => '',
'pp_main_height' => '',
'pp_main_width' => 0,
'pp_main_height' => 0,
'pp_thumb_photo' => '',
'pp_thumb_width' => '',
'pp_thumb_height' => '' ), 'pp_member_id='.$mid );
'pp_thumb_width' => 0,
'pp_thumb_height' => 0 ), 'pp_member_id='.$mid );
}
else
{
$this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_main_photo' => '',
'pp_main_width' => '',
'pp_main_height' => '',
'pp_main_width' => 0,
'pp_main_height' => 0,
'pp_thumb_photo' => '',
'pp_thumb_width' => '',
'pp_thumb_height' => '',
'pp_thumb_width' => 0,
'pp_thumb_height' => 0,
'pp_member_id' => $mid ) );
}
@@ -996,7 +992,7 @@ class moderate
if ( count($this->pids) )
{
$this->ipsclass->DB->do_update( 'posts', array( 'queued' => $queued_post ), 'pid IN ('. implode(",", $this->pids) .')' );
$this->ipsclass->DB->do_update( 'posts', array( 'queued' => $queued_post ), 'topic_id=' . $this->topic['tid'] . ' AND pid IN ('. implode(",", $this->pids) .')' );
}
if( $approve )
@@ -1076,7 +1072,7 @@ class moderate
$this->ipsclass->DB->simple_construct( array(
'select' => 'post, pid, post_date, author_id, author_name',
'from' => 'posts',
'where' => "pid IN (".implode(",", $this->pids).")",
'where' => 'topic_id=' . $this->topic['tid'] . ' AND pid IN (' . implode( ',', $this->pids) . ')',
'order' => 'post_date'
) );
@@ -1165,10 +1161,7 @@ class moderate
// Do we choose too many?
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => 'count(pid) as cnt', 'from' => 'posts', 'where' => "topic_id={$this->topic['tid']}" ) );
$this->ipsclass->DB->simple_exec();
$count = $this->ipsclass->DB->fetch_row();
$count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(pid) as cnt', 'from' => 'posts', 'where' => "topic_id={$this->topic['tid']}" ) );
if ( $affected_ids >= $count['cnt'] )
{
@@ -1217,7 +1210,7 @@ class moderate
$this->ipsclass->DB->build_query( array( 'select' => 'pid, queued',
'from' => 'posts',
'where' => "pid IN($pid_string)",
'where' => 'topic_id=' . $this->topic['tid'] . " AND pid IN($pid_string)",
'order' => 'pid ASC',
'limit' => array(0,1),
) );
@@ -1263,7 +1256,7 @@ class moderate
// Move the posts
//-----------------------------------------
$this->ipsclass->DB->do_update( 'posts', array( 'topic_id' => $new_topic_id, 'new_topic' => 0 ), "pid IN($pid_string)" );
$this->ipsclass->DB->do_update( 'posts', array( 'topic_id' => $new_topic_id, 'new_topic' => 0 ), 'topic_id=' . $this->topic['tid'] . " AND pid IN($pid_string)" );
//-----------------------------------------
// Move the posts
@@ -1440,7 +1433,7 @@ class moderate
$this->parser->parse_html = 0;
$this->parser->parse_bbcode = 1;
$post = $this->parser->pre_db_parse( $this->ipsclass->input['Post'] );
$post = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $this->ipsclass->input['Post'] ) );
//-----------------------------------------
// Post to keep...
@@ -1680,7 +1673,7 @@ class moderate
$this->modfunc->forum_recount( $this->forum['id'] );
$this->modfunc->stats_recount();
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_approve_topic'], $this->topic['tid'] ) );
$this->moderate_log( sprintf( $type == 'approve' ? $this->ipsclass->lang['acp_approve_topic'] : $this->ipsclass->lang['acp_unapprove_topic'], $this->topic['tid'] ) );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['redirect_modified'], "showtopic=".$this->topic['tid']."&amp;st=".intval($this->ipsclass->input['st']) );
}
@@ -1801,7 +1794,7 @@ class moderate
//-----------------------------------------
$this->ipsclass->input['check'] = 0;
$this->ipsclass->input['dateline'] = round((time()-$this->ipsclass->input['dateline'])/24/60/60);
$this->ipsclass->input['dateline'] = $this->ipsclass->input['dateline'] > 0 ? round((time()-$this->ipsclass->input['dateline'])/24/60/60) : 0;
$this->prune_start( $this->ipsclass->compiled_templates['skin_mod']->mod_simple_page( $this->ipsclass->lang['cp_results'], $this->ipsclass->lang['cp_result_move']. ($max) ) );
}
else
@@ -1965,6 +1958,13 @@ class moderate
$this->ipsclass->input['determine'] = isset($this->ipsclass->input['determine']) ? $this->ipsclass->input['determine'] : '';
$this->ipsclass->input['dateline'] = isset($this->ipsclass->input['dateline']) ? $this->ipsclass->input['dateline'] : '';
// If length of dateline is greater than 8, assume it's a timestamp
if( strlen( $this->ipsclass->input['dateline'] ) > 8 )
{
$this->ipsclass->input['dateline'] = round( ( time() - $this->ipsclass->input['dateline']) /60/60/24 );
}
//-----------------------------------------
// Are we checking first?
//-----------------------------------------
@@ -1974,7 +1974,7 @@ class moderate
$link = "&amp;pergo=".$this->ipsclass->input['pergo'];
$link_text = $this->ipsclass->lang['cp_prune_dorem'];
$tcount = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as tcount', 'from' => 'topics', 'where' => "approved=1 and forum_id={$this->forum['id']}" ) );
$tcount = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as tcount', 'from' => 'topics', 'where' => "forum_id={$this->forum['id']}" ) );
$db_query = "";
@@ -1996,7 +1996,7 @@ class moderate
if ( $this->ipsclass->input['member'] )
{
$this->ipsclass->DB->build_query( array( 'select' => 'id', 'from' => 'members', 'where' => "name='".$this->ipsclass->input['member']."'" ) );
$this->ipsclass->DB->build_query( array( 'select' => 'id', 'from' => 'members', 'where' => "members_display_name='".$this->ipsclass->input['member']."'" ) );
$this->ipsclass->DB->exec_query();
if (! $mem = $this->ipsclass->DB->fetch_row() )
@@ -2035,7 +2035,7 @@ class moderate
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as count',
'from' => 'topics',
'where' => "approved=1 and forum_id='".$this->forum['id']."'" . $db_query ) );
'where' => "forum_id='".$this->forum['id']."'" . $db_query ) );
$this->ipsclass->DB->simple_exec();
@@ -2200,7 +2200,7 @@ class moderate
{
$pass = 1;
}
else if ($this->moderator['delete_topic'] == 1)
else if ($this->moderator['split_merge'] == 1)
{
$pass = 1;
}
@@ -2348,7 +2348,7 @@ class moderate
if ($source_id == "")
{
$this->moderate_error('cp_error_move');
$this->moderate_error('forum_no_post_allowed');
return;
}
@@ -2356,7 +2356,7 @@ class moderate
if ($dest_id == "" or $dest_id == -1)
{
$this->moderate_error('cp_error_move');
$this->moderate_error('forum_no_post_allowed');
return;
}
@@ -2364,7 +2364,7 @@ class moderate
if ($source_id == $dest_id)
{
$this->moderate_error('cp_error_move');
$this->moderate_error('move_same_forum');
return;
}
@@ -2375,7 +2375,7 @@ class moderate
if ( $this->ipsclass->DB->get_num_rows() != 2 )
{
$this->moderate_error('cp_error_move');
$this->moderate_error('move_same_forum');
return;
}
@@ -2634,7 +2634,7 @@ class moderate
$this->parser->parse_bbcode = 1;
$this->modfunc->topic_add_reply(
$this->parser->pre_db_parse( $this->mm_data['topic_reply_content'] )
$this->parser->pre_display_parse( $this->parser->pre_db_parse( $this->mm_data['topic_reply_content'] ) )
, $move_ids
, $this->mm_data['topic_reply_postcount']
);
@@ -2850,9 +2850,8 @@ class moderate
$this->page_title = $this->topic['title'];
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
);
$this->nav = $this->ipsclass->forums->forums_breadcrumb_nav( $topic['forum_id'] );
$this->nav[] = "<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>";
}
/*-------------------------------------------------------------------------*/