Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Search Result from Index
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @since 15 Sep 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
@@ -59,7 +59,7 @@ class _Content extends \IPS\Content\Search\Result
|
||||
* @param array $indexData Data from index
|
||||
* @param array $authorData Basic data about the author. Only includes columns returned by \IPS\Member::columnsForPhoto()
|
||||
* @param array $itemData Basic data about the item. Only includes columns returned by item::basicDataColumns()
|
||||
* @param array|NULL $containerData Basic data about the author. Only includes columns returned by container::basicDataColumns()
|
||||
* @param array|NULL $containerData Basic data about the container. Only includes columns returned by container::basicDataColumns()
|
||||
* @param array $reputationData Array of people who have given reputation and the reputation they gave
|
||||
* @param int|NULL $reviewRating If this is a review, the rating
|
||||
* @param bool $iPostedIn If the user has posted in the item
|
||||
@@ -83,11 +83,31 @@ class _Content extends \IPS\Content\Search\Result
|
||||
*
|
||||
* @param string $view 'expanded' or 'condensed'
|
||||
* @param bool $asItem Displaying results as items?
|
||||
* @param bool $canIgnoreComments Can ignore comments in the result stream? Activity stream can, but search results cannot.
|
||||
* @param array|NULL $template Optional custom template
|
||||
* @return string
|
||||
*/
|
||||
public function html( $view = 'expanded', $asItem = FALSE )
|
||||
public function html( $view = 'expanded', $asItem = FALSE, $canIgnoreComments=FALSE, $template=NULL )
|
||||
{
|
||||
return call_user_func( array( $this->indexData['index_class'], 'searchResult' ), $this->indexData, $this->authorData, $this->itemData, $this->containerData, $this->reputationData, $this->reviewRating, $this->iPostedIn, $view, $asItem );
|
||||
return call_user_func( array( $this->indexData['index_class'], 'searchResult' ), $this->indexData, $this->authorData, $this->itemData, $this->containerData, $this->reputationData, $this->reviewRating, $this->iPostedIn, $view, $asItem, $canIgnoreComments, $template );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return search index data as an array
|
||||
*
|
||||
* @return array( 'indexData' => array() ... )
|
||||
*/
|
||||
public function asArray()
|
||||
{
|
||||
return array(
|
||||
'indexData' => $this->indexData,
|
||||
'authorData' => $this->authorData,
|
||||
'itemData' => $this->itemData,
|
||||
'containerData' => $this->containerData,
|
||||
'reputationData' => $this->reputationData,
|
||||
'reviewRating' => $this->reviewRating,
|
||||
'iPostedIn' => $this->iPostedIn
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,6 +120,6 @@ class _Content extends \IPS\Content\Search\Result
|
||||
{
|
||||
$class = $this->indexData['index_class'];
|
||||
$object = $class::load( $this->indexData['index_object_id'] );
|
||||
$document->addItem( $object->mapped('title'), $object->url(), $this->indexData['index_content'], \IPS\DateTime::ts( $this->indexData['index_date_created'] ) );
|
||||
$document->addItem( $object instanceof \IPS\Content\Comment ? $object->item()->mapped('title') : $object->mapped('title'), $object->url(), $this->indexData['index_content'], \IPS\DateTime::ts( $this->indexData['index_date_created'] ) );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user