Version 2.2.0 RC-1
This commit is contained in:
1 parent
f73f8bff6d
commit
22f1b963ee
1034 files changed
+178610
-70897
No files matched your search
@@ -2,28 +2,18 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| 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-02-02 17:23:13 +0000 (Thu, 02 Feb 2006) $
|
||||
| > $Revision: 133 $
|
||||
| > $Author: bfarber $
|
||||
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > MySQL Manual Search Library
|
||||
@@ -34,6 +24,11 @@
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
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
|
||||
{
|
||||
@@ -62,13 +57,9 @@ class search_lib extends Search
|
||||
// Do we have any input?
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ($this->ipsclass->input['namesearch'] != "")
|
||||
{
|
||||
$name_filter = $this->is->filter_keywords($this->ipsclass->input['namesearch'], 1);
|
||||
}
|
||||
$name_filter = (isset($this->ipsclass->input['namesearch']) AND $this->ipsclass->input['namesearch'] != "") ? $this->is->filter_keywords($this->ipsclass->input['namesearch'], 1) : '';
|
||||
|
||||
if ($this->ipsclass->input['useridsearch'] != "")
|
||||
if (isset($this->ipsclass->input['useridsearch']) AND $this->ipsclass->input['useridsearch'] != "")
|
||||
{
|
||||
$keywords = $this->is->filter_keywords($this->ipsclass->input['useridsearch']);
|
||||
$this->is->search_type = 'userid';
|
||||
@@ -79,6 +70,8 @@ class search_lib extends Search
|
||||
$this->is->search_type = 'posts';
|
||||
}
|
||||
|
||||
$type = 'postonly';
|
||||
|
||||
if ( $name_filter != "" AND $this->ipsclass->input['keywords'] != "" )
|
||||
{
|
||||
$type = 'joined';
|
||||
@@ -130,7 +123,7 @@ class search_lib extends Search
|
||||
|
||||
foreach( array( 'last_post', 'posts', 'starter_name', 'forum_id' ) as $v )
|
||||
{
|
||||
if ($this->ipsclass->input['sort_key'] == $v)
|
||||
if (isset($this->ipsclass->input['sort_key']) AND $this->ipsclass->input['sort_key'] == $v)
|
||||
{
|
||||
$this->is->sort_key = $v;
|
||||
}
|
||||
@@ -140,7 +133,7 @@ class search_lib extends Search
|
||||
|
||||
foreach ( array( 1, 7, 30, 60, 90, 180, 365, 0 ) as $v )
|
||||
{
|
||||
if ($this->ipsclass->input['prune'] == $v)
|
||||
if (isset($this->ipsclass->input['prune']) AND $this->ipsclass->input['prune'] == $v)
|
||||
{
|
||||
$this->is->prune = $v;
|
||||
}
|
||||
@@ -148,14 +141,14 @@ class search_lib extends Search
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
if ($this->ipsclass->input['sort_order'] == 'asc')
|
||||
if (isset($this->ipsclass->input['sort_order']) AND $this->ipsclass->input['sort_order'] == 'asc')
|
||||
{
|
||||
$this->is->sort_order = 'asc';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
if ($this->ipsclass->input['result_type'] == 'posts')
|
||||
if (isset($this->ipsclass->input['result_type']) AND $this->ipsclass->input['result_type'] == 'posts')
|
||||
{
|
||||
$this->is->result_type = 'posts';
|
||||
}
|
||||
@@ -165,6 +158,11 @@ class search_lib extends Search
|
||||
$this->ipsclass->vars['min_search_word'] = 4;
|
||||
}
|
||||
|
||||
$topics_datecut = "";
|
||||
$posts_datecut = "";
|
||||
$posts_name = "";
|
||||
$topics_name = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// Add on the prune days
|
||||
//-----------------------------------------
|
||||
@@ -202,13 +200,13 @@ class search_lib extends Search
|
||||
|
||||
$name_filter = str_replace( '|', "|", $name_filter );
|
||||
|
||||
if ($this->ipsclass->input['exactname'] == 1)
|
||||
if (isset($this->ipsclass->input['exactname']) AND $this->ipsclass->input['exactname'] == 1)
|
||||
{
|
||||
$sql_query = "SELECT id from ibf_members WHERE LOWER(members_display_name)='".$name_filter."'";
|
||||
$sql_query = "SELECT id from ".SQL_PREFIX."members WHERE members_l_display_name='".$name_filter."'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_query = "SELECT id from ibf_members WHERE members_display_name like '%".$name_filter."%'";
|
||||
$sql_query = "SELECT id from ".SQL_PREFIX."members WHERE members_display_name like '%".$name_filter."%'";
|
||||
}
|
||||
|
||||
|
||||
@@ -295,29 +293,28 @@ class search_lib extends Search
|
||||
}
|
||||
|
||||
$topics_query = "SELECT t.tid, t.approved, t.forum_id
|
||||
FROM ibf_topics t
|
||||
FROM ".SQL_PREFIX."topics t
|
||||
WHERE {$topic_filter}{$topics_datecut} t.forum_id IN ($forums)
|
||||
$topics_name AND t.approved=1 AND ($title_like)";
|
||||
$topics_name AND ($title_like)";
|
||||
|
||||
|
||||
$posts_query = "SELECT p.pid, p.queued, t.approved, t.forum_id
|
||||
FROM ibf_posts p
|
||||
LEFT JOIN ibf_topics t on (t.tid=p.topic_id)
|
||||
FROM ".SQL_PREFIX."posts p
|
||||
LEFT JOIN ".SQL_PREFIX."topics t on (t.tid=p.topic_id)
|
||||
WHERE {$topic_filter}{$posts_datecut} t.forum_id IN ($forums)
|
||||
AND p.queued=0
|
||||
$posts_name AND ($post_like)";
|
||||
}
|
||||
else
|
||||
{
|
||||
$topics_query = "SELECT t.tid, t.approved, t.forum_id
|
||||
FROM ibf_topics t
|
||||
FROM ".SQL_PREFIX."topics t
|
||||
WHERE $topics_datecut t.forum_id IN ($forums)
|
||||
$topics_name";
|
||||
|
||||
|
||||
$posts_query = "SELECT p.pid, p.queued, t.approved, t.forum_id
|
||||
FROM ibf_posts p
|
||||
LEFT JOIN ibf_topics t on (t.tid=p.topic_id)
|
||||
FROM ".SQL_PREFIX."posts p
|
||||
LEFT JOIN ".SQL_PREFIX."topics t on (t.tid=p.topic_id)
|
||||
WHERE $posts_datecut t.forum_id IN ($forums)
|
||||
AND p.queued=0
|
||||
$posts_name";
|
||||
@@ -339,9 +336,9 @@ class search_lib extends Search
|
||||
$my_invisible_forums_t = array();
|
||||
$my_invisible_forums_p = array();
|
||||
|
||||
if( is_array($this->ipsclass->cache['moderators']) AND count($this->ipsclass->cache['moderators']) )
|
||||
if( isset($this->ipsclass->cache['moderators']) AND is_array($this->ipsclass->cache['moderators']) AND count($this->ipsclass->cache['moderators']) )
|
||||
{
|
||||
foreach( $this->ipsclass->cache['moderators'] as $k => $v )
|
||||
foreach( $this->ipsclass->cache['moderators'] as $v )
|
||||
{
|
||||
if( $v['member_id'] == $this->ipsclass->member['id'] AND $v['post_q'] )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user