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

+47 -58
View File
@@ -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-09-28 17:05:45 -0500 (Thu, 28 Sep 2006) $
| > $Revision: 587 $
| > $Date: 2007-12-17 18:07:20 -0500 (Mon, 17 Dec 2007) $
| > $Revision: 1149 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
@@ -38,7 +28,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();
}
@@ -81,11 +71,15 @@ class forums {
// Init functions
/*-------------------------------------------------------------------------*/
function init()
function init( $do_not_skin_load=0 )
{
$this->ipsclass->load_language('lang_forum');
$this->ipsclass->load_template('skin_forum');
if ( ! $do_not_skin_load )
{
$this->ipsclass->load_template('skin_forum');
}
$this->auth_key = $this->ipsclass->return_md5_check();
if ( $read = $this->ipsclass->my_getcookie('topicsread') )
@@ -463,13 +457,13 @@ class forums {
$announce_html = "";
rsort( $announcements );
krsort( $announcements );
foreach( $announcements as $announce )
{
if ( $announce['announce_start'] )
{
$announce['announce_start'] = gmdate( 'd.m.Y', $announce['announce_start'] );
$announce['announce_start'] = gmdate( 'jS F Y', $announce['announce_start'] );
}
else
{
@@ -1079,7 +1073,8 @@ class forums {
// Update counter
//-----------------------------------------
$save_array['marker_unread'] = intval($count['cnt']);
$save_array['marker_unread'] = intval($count['cnt']);
$save_array['marker_last_cleared'] = $this->db_row['marker_last_cleared'];
//-----------------------------------------
// Topics unread: Clean out old topics
@@ -1098,7 +1093,7 @@ class forums {
$this->my_topics_read = array();
}
$save_array['marker_topics_read'] = serialize( $this->my_topics_read );
$save_array['marker_topics_read'] = serialize( $this->my_topics_read );
}
//-----------------------------------------
@@ -1112,30 +1107,12 @@ class forums {
$save_array['marker_unread'] = 0;
}
$save_array['marker_last_update'] = time();
if ( $this->db_row['marker_forum_id'] )
{
$this->ipsclass->DB->do_shutdown_update( 'topic_markers', $save_array, 'marker_member_id='.$this->ipsclass->member['id'].' AND marker_forum_id='.$this->forum['id'] );
}
else
{
// Better safe than sorry - been seeing a lot of SQL errors popping up about the dup unique key
$save_array['marker_last_update'] = time();
$save_array['marker_member_id'] = $this->ipsclass->member['id'];
$save_array['marker_forum_id'] = $this->forum['id'];
$save_array['marker_last_cleared'] = intval($save_array['marker_last_cleared']);
$check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'marker_forum_id', 'from' => 'topic_markers', 'where' => 'marker_member_id='.$this->ipsclass->member['id'].' AND marker_forum_id='.$this->forum['id'] ) );
if( !$check['marker_forum_id'] )
{
$save_array['marker_member_id'] = $this->ipsclass->member['id'];
$save_array['marker_forum_id'] = $this->forum['id'];
$this->ipsclass->DB->do_shutdown_insert( 'topic_markers', $save_array );
}
else
{
$this->ipsclass->DB->do_shutdown_update( 'topic_markers', $save_array, 'marker_member_id='.$this->ipsclass->member['id'].' AND marker_forum_id='.$this->forum['id'] );
}
}
$this->ipsclass->DB->do_replace_into( 'topic_markers', $save_array, array('marker_member_id','marker_forum_id'), TRUE );
}
}
@@ -1182,10 +1159,11 @@ class forums {
//-----------------------------------------
$ar_time = time();
$cached = array();
$active = array( 'guests' => 0, 'anon' => 0, 'members' => 0, 'names' => "");
$rows = array( $ar_time => array( 'login_type' => substr($this->ipsclass->member['login_anonymous'],0, 1),
'id' => 0,
$cached = array();
$guests = array();
$active = array( 'guests' => 0, 'anon' => 0, 'members' => 0, 'names' => "");
$rows = array( $ar_time => array( 'login_type' => substr($this->ipsclass->member['login_anonymous'],0, 1),
'id' => $this->ipsclass->sess->session_id,
'location' => 'sf',
'running_time' => $ar_time,
'member_id' => $this->ipsclass->member['id'],
@@ -1229,7 +1207,14 @@ class forums {
if ($result['member_id'] == 0)
{
if( in_array( $result['id'], $guests ) )
{
continue;
}
$active['guests']++;
$guests[] = $result['id'];
}
else
{
@@ -1401,22 +1386,25 @@ class forums {
$last_time = $this->ipsclass->forum_read[ $topic['forum_id'] ];
}
}
//-----------------------------------------
// Attachy ment
//-----------------------------------------
$topic['attach_img'] = $topic['topic_hasattach'] ? $this->ipsclass->compiled_templates['skin_forum']->topic_attach_icon($topic['tid'], intval($topic['topic_hasattach'])) : '';
if ( is_object( $this->ipsclass->compiled_templates['skin_forum'] ) )
{
$topic['attach_img'] = $topic['topic_hasattach'] ? $this->ipsclass->compiled_templates['skin_forum']->topic_attach_icon($topic['tid'], intval($topic['topic_hasattach'])) : '';
}
//-----------------------------------------
// Yawn
//-----------------------------------------
$topic['last_text'] = $this->ipsclass->lang['last_post_by'];
$topic['last_poster'] = $topic['last_poster_id'] ? $this->ipsclass->make_profile_link( $topic['last_poster_name'], $topic['last_poster_id']) : "-".$topic['last_poster_name']."-";
$topic['last_poster'] = $topic['last_poster_id'] ? $this->ipsclass->make_profile_link( $topic['last_poster_name'], $topic['last_poster_id']) : $this->ipsclass->vars['guest_name_pre'] . $topic['last_poster_name'] . $this->ipsclass->vars['guest_name_suf'];
$topic['starter'] = $topic['starter_id'] ? $this->ipsclass->make_profile_link( $topic['starter_name'], $topic['starter_id']) : "-".$topic['starter_name']."-";
$topic['starter'] = $topic['starter_id'] ? $this->ipsclass->make_profile_link( $topic['starter_name'], $topic['starter_id']) : $this->ipsclass->vars['guest_name_pre'] . $topic['starter_name'] . $this->ipsclass->vars['guest_name_suf'];
$topic['prefix'] = $topic['poll_state'] ? $this->ipsclass->vars['pre_polls'].' ' : '';
@@ -1468,7 +1456,7 @@ class forums {
}
}
if ( $pages > 1 )
if ( $pages > 1 AND is_object( $this->ipsclass->compiled_templates['skin_forum'] ) )
{
for ( $i = 0 ; $i < $pages ; ++$i )
{
@@ -1527,7 +1515,7 @@ class forums {
$topic['prefix'] = $this->ipsclass->vars['pre_moved']." ";
$topic['go_new_post'] = "";
}
else
else if ( is_object( $this->ipsclass->compiled_templates['skin_forum'] ) )
{
$topic['posts'] = $this->ipsclass->compiled_templates['skin_forum']->who_link($topic['tid'], $topic['posts']);
}
@@ -1548,7 +1536,7 @@ class forums {
$topic['_rate_img'] = '';
if ( isset($this->forum['forum_allow_rating']) AND $this->forum['forum_allow_rating'] )
if ( isset($this->forum['forum_allow_rating']) AND $this->forum['forum_allow_rating'] AND is_object( $this->ipsclass->compiled_templates['skin_forum'] ) )
{
if ( $topic['topic_rating_total'] )
{
@@ -1630,8 +1618,9 @@ class forums {
// we've a pinned topic, but we've not printed the pinned
// starter row, so..
$show = $this->announce_out ? 1 : 0;
$p_start = $this->ipsclass->compiled_templates['skin_forum']->render_pinned_start( $show );
// We should always show this right?
//$show = $this->announce_out ? 1 : 0;
$p_start = $this->ipsclass->compiled_templates['skin_forum']->render_pinned_start( 1 );
$this->pinned_print = 1;
}