Version 2.0.0

This commit is contained in:
Neo committed 2025-12-19 00:19:56 -08:00
1 parent 5699abfc0e
commit 0eecc172d9
696 files changed
+120723 -77160

No files matched your search

+48 -48
View File
@@ -2,16 +2,15 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board v1.3.1 Final
| ========================================
| Invision Power Board v2.0.0
| =============================================
| by Matthew Mecham
| (c) 2001 - 2003 Invision Power Services
| (c) 2001 - 2004 Invision Power Services, Inc.
| http://www.invisionpower.com
| ========================================
| =============================================
| Web: http://www.invisionboard.com
| Time: Thu, 23 Sep 2004 23:05:01 GMT
| Release: 3cb325c445e1909182084806ae7f8226
| Email: matt@invisionpower.com
| Time: Tue, 21 Sep 2004 16:34:28 GMT
| Release: 150aa7a702c3c8b6f6eb90ad49305d2f
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
@@ -26,33 +25,32 @@
class search_lib extends Search
{
var $parser = "";
var $is = "";
//--------------------------------------------
//-----------------------------------------
// Constructor
//--------------------------------------------
//-----------------------------------------
function search_lib($that)
{
global $ibforums, $DB, $std, $print;
global $ibforums, $DB, $std, $print;
$this->is = &$that; // hahaha!
}
//--------------------------------------------
//-----------------------------------------
// Main Board Search-e-me-doo-daa
//--------------------------------------------
//-----------------------------------------
function do_main_search()
{
global $ibforums, $DB, $std, $HTTP_POST_VARS, $print;
//------------------------------------
//-----------------------------------------
// Do we have any input?
//------------------------------------
//-----------------------------------------
if ($ibforums->input['namesearch'] != "")
@@ -84,7 +82,7 @@ class search_lib extends Search
$type='nameonly';
}
//------------------------------------
//-----------------------------------------
$check_keywords = trim($keywords);
@@ -98,27 +96,27 @@ class search_lib extends Search
}
}
//------------------------------------
//-----------------------------------------
if ($ibforums->input['search_in'] == 'titles')
{
$this->is->search_in = 'titles';
}
//------------------------------------
//-----------------------------------------
$forums = $this->is->get_searchable_forums();
//------------------------------------
//-----------------------------------------
// Do we have any forums to search in?
//------------------------------------
//-----------------------------------------
if ($forums == "")
{
$std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_forum') );
}
//------------------------------------
//-----------------------------------------
foreach( array( 'last_post', 'posts', 'starter_name', 'forum_id' ) as $v )
{
@@ -128,7 +126,7 @@ class search_lib extends Search
}
}
//------------------------------------
//-----------------------------------------
foreach ( array( 1, 7, 30, 60, 90, 180, 365, 0 ) as $v )
{
@@ -138,14 +136,14 @@ class search_lib extends Search
}
}
//------------------------------------
//-----------------------------------------
if ($ibforums->input['sort_order'] == 'asc')
{
$this->is->sort_order = 'asc';
}
//------------------------------------
//-----------------------------------------
if ($ibforums->input['result_type'] == 'posts')
{
@@ -157,9 +155,9 @@ class search_lib extends Search
$ibforums->vars['min_search_word'] = 4;
}
//------------------------------------
//-----------------------------------------
// Add on the prune days
//------------------------------------
//-----------------------------------------
if ($this->is->prune > 0)
{
@@ -177,9 +175,9 @@ class search_lib extends Search
if ( $name_filter != "" )
{
//------------------------------------------------------------------
//-----------------------------------------
// Get all the possible matches for the supplied name from the DB
//------------------------------------------------------------------
//-----------------------------------------
$name_filter = str_replace( '|', "|", $name_filter );
@@ -273,11 +271,12 @@ class search_lib extends Search
$topics_name AND t.approved=1 AND ($title_like)";
$posts_query = "SELECT p.pid ".
"FROM ibf_posts p ".
"WHERE $posts_datecut p.forum_id IN ($forums)".
" AND p.queued <> 1".
" $posts_name AND ($post_like)";
$posts_query = "SELECT p.pid
FROM ibf_posts p
LEFT JOIN ibf_topics t on (t.tid=p.topic_id)
WHERE $posts_datecut t.forum_id IN ($forums)
AND p.queued <> 1
$posts_name AND ($post_like)";
}
else
{
@@ -287,22 +286,23 @@ class search_lib extends Search
$topics_name";
$posts_query = "SELECT p.pid ".
"FROM ibf_posts p ".
"WHERE $posts_datecut p.forum_id IN ($forums)".
" AND p.queued <> 1".
" $posts_name";
$posts_query = "SELECT p.pid
FROM ibf_posts p
LEFT JOIN ibf_topics t on (t.tid=p.topic_id)
WHERE $posts_datecut t.forum_id IN ($forums)
AND p.queued <> 1
$posts_name";
}
//------------------------------------------------
//-----------------------------------------
// Get the topic ID's to serialize and store into
// the database
//------------------------------------------------
//-----------------------------------------
$topics = "";
$posts = "";
//------------------------------------
//-----------------------------------------
$DB->query($topics_query);
@@ -315,7 +315,7 @@ class search_lib extends Search
$DB->free_result();
//------------------------------------
//-----------------------------------------
$DB->query($posts_query);
@@ -328,25 +328,25 @@ class search_lib extends Search
$DB->free_result();
//------------------------------------
//-----------------------------------------
$topics = preg_replace( "/,$/", "", $topics );
$posts = preg_replace( "/,$/", "", $posts );
//------------------------------------------------
//-----------------------------------------
// Do we have any results?
//------------------------------------------------
//-----------------------------------------
if ($topics == "" and $posts == "")
{
$std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) );
}
//------------------------------------------------
//-----------------------------------------
// If we are still here, return data like a good
// boy (or girl). Yes Reg; or girl.
// What have the Romans ever done for us?
//------------------------------------------------
//-----------------------------------------
return array(
'topic_id' => $topics,
@@ -361,4 +361,4 @@ class search_lib extends Search
}
?>
?>