Version 3.4.5
This commit is contained in:
1 parent
fb6b5baabc
commit
e4478369d8
1360 files changed
+228921
-179445
No files matched your search
@@ -2,18 +2,18 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Basic Forum Search
|
||||
* Last Updated: $Date: 2012-06-29 18:12:03 -0400 (Fri, 29 Jun 2012) $
|
||||
* Last Updated: $Date: 2013-04-29 20:59:30 -0400 (Mon, 29 Apr 2013) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: AndyMillne $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright © 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 11014 $
|
||||
* @version $Rev: 12207 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -462,7 +462,7 @@ class search_engine_forums extends search_engine
|
||||
}
|
||||
}
|
||||
|
||||
return array( 'count' => count( $tids ), 'resultSet' => $tids );
|
||||
return array( 'count' => count( $rows ), 'resultSet' => $tids );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -613,10 +613,12 @@ class search_engine_forums extends search_engine
|
||||
$this->sphinxClient->SetLimits( intval($start), intval($perPage) );
|
||||
|
||||
/* Get list of good forum IDs */
|
||||
$forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds( $this->memberData['member_id'] );
|
||||
|
||||
$this->sphinxClient->SetFilter( 'forum_id', $forumIdsOk );
|
||||
|
||||
if( $this->memberData['member_id'] != $member['member_id'] )
|
||||
{
|
||||
$forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds( $this->memberData['member_id'] );
|
||||
$this->sphinxClient->SetFilter( 'forum_id', $forumIdsOk );
|
||||
}
|
||||
|
||||
/* what we doing? */
|
||||
if ( IPSSearchRegistry::get('in.userMode') != 'title' )
|
||||
{
|
||||
@@ -960,22 +962,29 @@ class search_engine_forums extends search_engine
|
||||
return array( 'count' => 0, 'resultSet' => array() );
|
||||
}
|
||||
|
||||
$this->DB->build( array( 'select' => 'topic_id',
|
||||
'from' => 'posts',
|
||||
'where' => 'pid IN(' . implode( ',', $data['resultSet'] ) . ')' ) );
|
||||
|
||||
$this->DB->execute();
|
||||
|
||||
$_tmpTids = array();
|
||||
|
||||
while( $row = $this->DB->fetch() )
|
||||
if( IPSSearchRegistry::get('set.returnType') == 'pids' )
|
||||
{
|
||||
$_tmpTids[] = $row['topic_id'];
|
||||
$this->DB->build( array( 'select' => 'topic_id',
|
||||
'from' => 'posts',
|
||||
'where' => 'pid IN(' . implode( ',', $data['resultSet'] ) . ')' ) );
|
||||
|
||||
$this->DB->execute();
|
||||
|
||||
$_tmpTids = array();
|
||||
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$_tmpTids[] = $row['topic_id'];
|
||||
}
|
||||
|
||||
if ( count( $_tmpTids ) )
|
||||
{
|
||||
$where[] = "( tid IN(" . implode( ',', $_tmpTids ) . ')' . $_ffWhere . ' )';
|
||||
}
|
||||
}
|
||||
|
||||
if ( count( $_tmpTids ) )
|
||||
else
|
||||
{
|
||||
$where[] = "( tid IN(" . implode( ',', $_tmpTids ) . ')' . $_ffWhere . ' )';
|
||||
$where[] = "( tid IN(" . implode( ',', $data['resultSet'] ) . ')' . $_ffWhere . ' )';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user