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

+31 -39
View File
@@ -1,22 +1,15 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| (c) 2001 - 2004 Invision Power Services
| http://www.invisionboard.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 ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
| Email: matt@ibforums.com
| Licence Info: http://www.invisionpower.com
+---------------------------------------------------------------------------
|
| > Moderator Core Functions
@@ -30,12 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåâåðíûé âõîä</h1> Ó Âàñ íåò äîñòóïà ê äèðåêòèâå ýòîãî ôàéëà. Åñëè âû ïðîâîäèëè îáíîâëåíèÿ, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü 'admin.php'.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class func_mod
{
var $ipsclass;
@@ -212,7 +204,7 @@ class func_mod
$this->rebuild_topic($tid);
}
$this->add_moderate_log("", "", "", $pid, "Óäàëåííûå ñîîáùåíèÿ ñ id ($pid)");
$this->add_moderate_log("", "", "", $pid, "Deleted posts ($pid)");
return TRUE;
}
@@ -307,16 +299,16 @@ class func_mod
$this->ipsclass->DB->force_data_type = array( 'starter_name' => 'string',
'last_poster_name' => 'string' );
$this->ipsclass->DB->do_update( 'topics', array( 'last_post' => $last_post['post_date'] ? $last_post['post_date'] : $first_post['post_date'],
'last_poster_id' => $last_post['author_id'] ? $last_post['author_id'] : $first_post['author_id'],
'last_poster_name' => $last_poster_name ? $last_poster_name : $first_poster_name,
'topic_queuedposts' => $qpcount,
'posts' => $pcount,
'starter_id' => $first_post['author_id'],
$this->ipsclass->DB->do_update( 'topics', array( 'last_post' => intval($last_post['post_date'] ? $last_post['post_date'] : $first_post['post_date']),
'last_poster_id' => intval($last_post['author_id'] ? $last_post['author_id'] : ( $pcount > 0 ? 0 : $first_post['author_id'] )),
'last_poster_name' => $last_poster_name ? $last_poster_name : ( $pcount > 0 ? $this->ipsclass->lang['global_guestname'] : $first_poster_name ),
'topic_queuedposts' => intval($qpcount),
'posts' => intval($pcount),
'starter_id' => intval($first_post['author_id']),
'starter_name' => $first_poster_name,
'start_date' => $first_post['post_date'],
'topic_firstpost' => $first_post['pid'],
'start_date' => intval($first_post['post_date']),
'topic_firstpost' => intval($first_post['pid']),
'topic_hasattach' => intval($attach['count'])
), 'tid='.$tid );
@@ -335,7 +327,7 @@ class func_mod
// the last post in a forum, best update that :D
//-----------------------------------------
if ( ($this->ipsclass->forums->forums_by_id[ $last_post['forum_id'] ]['last_id'] == $tid) AND ($doforum == 1) )
if ( ($this->ipsclass->forums->forum_by_id[ $last_post['forum_id'] ]['last_id'] == $tid) AND ($doforum == 1) )
{
$tt = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'title, tid, last_post, last_poster_id, last_poster_name',
'from' => 'topics',
@@ -346,10 +338,10 @@ class func_mod
$dbs = array(
'last_title' => $tt['title'] ? $tt['title'] : "",
'last_id' => $tt['tid'] ? $tt['tid'] : "",
'last_post' => $tt['last_post'] ? $tt['last_post'] : "",
'last_id' => $tt['tid'] ? $tt['tid'] : 0,
'last_post' => $tt['last_post'] ? $tt['last_post'] : 0,
'last_poster_name' => $tt['last_poster_name'] ? $tt['last_poster_name'] : "",
'last_poster_id' => $tt['last_poster_id'] ? $tt['last_poster_id'] : "",
'last_poster_id' => $tt['last_poster_id'] ? $tt['last_poster_id'] : 0,
);
$this->ipsclass->DB->force_data_type = array( 'last_poster_name' => 'string',
@@ -357,14 +349,14 @@ class func_mod
$this->ipsclass->DB->do_update( 'forums', $dbs, "id=".intval($this->forum['id']) );
if ( $this->ipsclass->forums->forums_by_id[ $this->forum['id'] ]['newest_id'] == $tid )
if ( $this->ipsclass->forums->forum_by_id[ $this->forum['id'] ]['newest_id'] == $tid )
{
$sort_key = $this->ipsclass->forums->forums_by_id[ $this->forum['id'] ]['sort_key'];
$sort_key = $this->ipsclass->forums->forum_by_id[ $this->forum['id'] ]['sort_key'];
$tt = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'title, tid',
'from' => 'topics',
'where' => 'forum_id='.$this->forum['id'].' and approved=1',
'order' => $sort_key.' desc',
'order' => 'start_date desc',
'limit' => array( 0,1 )
) );
@@ -972,7 +964,7 @@ class func_mod
$newest_topic = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'title, tid',
'from' => 'topics',
'where' => 'forum_id='.$fid.' and approved=1',
'order' => $sort_key.' desc',
'order' => 'start_date desc',
'limit' => array( 0,1 )
) );
@@ -1221,7 +1213,7 @@ class func_mod
function sql_prune_create( $forum_id, $starter_id="", $topic_state="", $post_min="", $date_exp="", $ignore_pin="", $pergo=0, $limit=0 )
{
$this->ipsclass->DB->build_query( array( 'select' => 'tid', 'from' => 'topics', 'where' => 'approved=1 and forum_id='.intval($forum_id) ) );
$this->ipsclass->DB->build_query( array( 'select' => 'tid', 'from' => 'topics', 'where' => 'forum_id='.intval($forum_id) ) );
$sql = $this->ipsclass->DB->cur_query;
@@ -1331,9 +1323,9 @@ class func_mod
'ip_address' => $this->ipsclass->input['IP_ADDRESS'],
'http_referer'=> htmlspecialchars($this->ipsclass->my_getenv('HTTP_REFERER')),
'ctime' => time(),
'topic_title' => $t_title,
'action' => $mod_title,
'query_string'=> htmlspecialchars($this->ipsclass->my_getenv('QUERY_STRING')),
'topic_title' => substr( $t_title, 0, 255 ),
'action' => substr( $mod_title, 0, 128 ),
'query_string'=> substr( htmlspecialchars($this->ipsclass->my_getenv('QUERY_STRING')), 0, 255 ),
) );
return TRUE;
}