Skip to content

Commit

Permalink
Fix search
Browse files Browse the repository at this point in the history
  • Loading branch information
voltan committed Sep 3, 2017
1 parent 8d2fea5 commit 684414c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Api/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class Search extends AbstractSearch
protected $searchIn = array(
'title',
'text_description',
'tags',
);

/**
Expand All @@ -39,7 +38,7 @@ class Search extends AbstractSearch
'title' => 'title',
'text_description' => 'content',
'time_create' => 'time',
'uid' => 'uid',
'main_image' => 'main_image',
'slug' => 'slug',
);

Expand All @@ -53,7 +52,7 @@ class Search extends AbstractSearch
/**
* {@inheritDoc}
*/
protected function buildUrl(array $item)
protected function buildUrl(array $item, $table = '')
{
$link = Pi::url(Pi::service('url')->assemble('ask', array(
'module' => $this->getModule(),
Expand All @@ -63,4 +62,12 @@ protected function buildUrl(array $item)

return $link;
}

/**
* {@inheritDoc}
*/
protected function buildImage(array $item, $table = '')
{
return Pi::url((string)Pi::api('doc', 'media')->getSingleLinkUrl($item['main_image'])->thumb('thumbnail'));
}
}

0 comments on commit 684414c

Please sign in to comment.