Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -2,44 +2,41 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Generates a search and returns the results [ MySQL ]
|
||||
* Last Updated: $Date: 2010-07-06 07:25:33 -0400 (Tue, 06 Jul 2010) $
|
||||
* Last Updated: $Date: 2011-09-01 17:55:10 -0400 (Thu, 01 Sep 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6602 $
|
||||
**/
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9441 $
|
||||
*/
|
||||
|
||||
class messengerSearch
|
||||
{
|
||||
/**
|
||||
* Results
|
||||
*
|
||||
* @access private
|
||||
* @var array
|
||||
*/
|
||||
private $_results = array();
|
||||
protected $_results = array();
|
||||
|
||||
/**
|
||||
* Total rows
|
||||
*
|
||||
* @access private
|
||||
* @var int
|
||||
*/
|
||||
private $_rows = 0;
|
||||
protected $_rows = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
@@ -58,7 +55,6 @@ class messengerSearch
|
||||
/**
|
||||
* Search
|
||||
*
|
||||
* @access public
|
||||
* @param int Member ID who is searching
|
||||
* @param string Words to search (probably tainted at this point, so be careful!)
|
||||
* @param int Offset start
|
||||
@@ -86,7 +82,7 @@ class messengerSearch
|
||||
$this->DB->allow_sub_select = 1;
|
||||
|
||||
/* Type of search */
|
||||
if( $this->settings['use_fulltext'] )
|
||||
if( $this->settings['use_fulltext'] AND strtolower($this->settings['mysql_tbl_type']) == 'myisam' )
|
||||
{
|
||||
$whereOne = "MATCH( t.mt_title ) AGAINST( '{$words}' IN BOOLEAN MODE )";
|
||||
$whereTwo = "MATCH( p.msg_post ) AGAINST( '{$words}' IN BOOLEAN MODE )";
|
||||
@@ -99,12 +95,12 @@ class messengerSearch
|
||||
|
||||
$this->DB->query( "SELECT SQL_CALC_FOUND_ROWS mt_id, mt_first_msg_id FROM ( ( SELECT t.mt_id, t.mt_first_msg_id
|
||||
FROM {$dbpre}message_topics t, {$dbpre}message_topic_user_map m
|
||||
WHERE (t.mt_id=m.map_topic_id AND m.map_user_id=" . $memberID . " AND m.map_user_banned=0 AND t.mt_is_deleted=0) AND {$whereOne}
|
||||
WHERE (t.mt_id=m.map_topic_id AND m.map_user_id=" . $memberID . " AND m.map_user_banned=0 AND m.map_user_active=1 AND t.mt_is_deleted=0) AND {$whereOne}
|
||||
ORDER BY t.mt_last_post_time DESC )
|
||||
UNION
|
||||
( SELECT p.msg_topic_id, p.msg_id
|
||||
FROM {$dbpre}message_posts p, {$dbpre}message_topic_user_map m
|
||||
WHERE (p.msg_topic_id=m.map_topic_id AND m.map_user_id=" . $memberID . " AND m.map_user_banned=0) AND {$whereTwo}
|
||||
WHERE (p.msg_topic_id=m.map_topic_id AND m.map_user_id=" . $memberID . " AND m.map_user_banned=0 AND m.map_user_active=1) AND {$whereTwo}
|
||||
ORDER BY p.msg_date DESC ) ) as tbl
|
||||
GROUP BY mt_id
|
||||
LIMIT $start, $end" );
|
||||
@@ -152,7 +148,6 @@ class messengerSearch
|
||||
/**
|
||||
* Fetch results
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function fetchResults()
|
||||
@@ -163,7 +158,6 @@ class messengerSearch
|
||||
/**
|
||||
* Fetch total result row count
|
||||
*
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function fetchTotalRows()
|
||||
|
||||
Reference in new issue
Block a user