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

+38 -25
View File
@@ -2,25 +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 ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-11-22 12:58:39 -0600 (Wed, 22 Nov 2006) $
| > $Revision: 739 $
| > $Date: 2008-04-23 15:02:02 -0400 (Wed, 23 Apr 2008) $
| > $Revision: 1254 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
@@ -32,15 +24,14 @@
+--------------------------------------------------------------------------
*/
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 search_lib extends Search
{
var $parser = "";
var $is = "";
var $resultlimit = "";
@@ -54,6 +45,12 @@ class search_lib extends Search
$this->resultlimit = $this->is->resultlimit;
}
function do_simple_search()
{
return $this->do_main_search();
}
//-----------------------------------------
// Main Board Search-e-me-doo-daa
//-----------------------------------------
@@ -240,7 +237,7 @@ class search_lib extends Search
}
if ( strlen(trim($keywords)) > 100 )
if ( $this->ipsclass->txt_mb_strlen(trim($keywords)) > 100 )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_word_long', 'EXTRA' => 100) );
}
@@ -302,31 +299,43 @@ class search_lib extends Search
{
if( $v['member_id'] == $this->ipsclass->member['id'] AND $v['post_q'] )
{
$my_invisible_forums_p[] = $v['forum_id'];
if( in_array( $v['forum_id'], $this->is->searchable_forums ) )
{
$my_invisible_forums_p[] = $v['forum_id'];
}
}
if( $v['member_id'] == $this->ipsclass->member['id'] AND $v['topic_q'] )
{
$my_invisible_forums_t[] = $v['forum_id'];
if( in_array( $v['forum_id'], $this->is->searchable_forums ) )
{
$my_invisible_forums_t[] = $v['forum_id'];
}
}
if( $v['is_group'] && ( $v['group_id'] == $this->ipsclass->member['mgroup']
OR in_array( $v['group_id'], explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ) ) && $v['post_q'] )
{
$my_invisible_forums_p[] = $v['forum_id'];
if( in_array( $v['forum_id'], $this->is->searchable_forums ) )
{
$my_invisible_forums_p[] = $v['forum_id'];
}
}
if( $v['is_group'] && ( $v['group_id'] == $this->ipsclass->member['mgroup']
OR in_array( $v['group_id'], explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ) ) && $v['topic_q'] )
{
$my_invisible_forums_t[] = $v['forum_id'];
if( in_array( $v['forum_id'], $this->is->searchable_forums ) )
{
$my_invisible_forums_t[] = $v['forum_id'];
}
}
}
}
$t_forum_query = $this->ipsclass->member['g_is_supmod'] ? "t.forum_id IN ($forums)" :
( count($my_invisible_forums_t) ? "( (t.forum_id IN ($forums) AND t.approved=1) OR t.forum_id IN(" . implode( ",", $my_invisible_forums_t ) . ") )" :
"t.forum_id IN ($forums)" );
"( t.forum_id IN ($forums) AND t.approved=1)" );
if( $this->ipsclass->member['g_is_supmod'] )
{
@@ -379,6 +388,7 @@ class search_lib extends Search
FROM ".SQL_PREFIX."topics t
WHERE {$topic_filter}{$topics_datecut} $t_forum_query
$topics_name AND ($title_like)
ORDER BY t.last_post {$this->is->sort_order}
LIMIT {$this->resultlimit}";
@@ -387,6 +397,7 @@ class search_lib extends Search
LEFT JOIN ".SQL_PREFIX."topics t on (t.tid=p.topic_id)
WHERE {$topic_filter}{$posts_datecut} $p_forum_query
$posts_name AND ($post_like)
ORDER BY p.post_date {$this->is->sort_order}
LIMIT {$this->resultlimit}";
}
else
@@ -395,6 +406,7 @@ class search_lib extends Search
FROM ".SQL_PREFIX."topics t
WHERE $topics_datecut $t_forum_query
$topics_name
ORDER BY t.last_post {$this->is->sort_order}
LIMIT {$this->resultlimit}";
@@ -404,6 +416,7 @@ class search_lib extends Search
WHERE $posts_datecut $p_forum_query
AND p.queued=0
$posts_name
ORDER BY p.post_date {$this->is->sort_order}
LIMIT {$this->resultlimit}";
}
@@ -421,14 +434,14 @@ class search_lib extends Search
//-----------------------------------------
$this->ipsclass->DB->query($topics_query);
$topic_max_hits = $this->ipsclass->DB->get_num_rows();
if( $topic_max_hits == $this->resultlimit )
{
{
$more = 1;
}
while ($row = $this->ipsclass->DB->fetch_row() )
{
/*if( !$row['approved'] )
@@ -461,7 +474,7 @@ class search_lib extends Search
$this->ipsclass->DB->query($posts_query);
$post_max_hits = $this->ipsclass->DB->get_num_rows();
if( $post_max_hits == $this->resultlimit )
{
$more = 1;