Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…seach

* 'master' of https://github.com/SilverStripers/elemental-seach:
  no message

Conflicts:
	src/Extensions/SearchDocumentGenerator.php
  • Loading branch information
fonsekaean committed Nov 18, 2018
2 parents 7f543aa + 00aa546 commit b7ac7d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Extensions/SearchDocumentGenerator.php
Original file line number Diff line number Diff line change
@@ -24,7 +24,10 @@ public function getGenerateSearchLink()
{
$owner = $this->owner;
if(method_exists($owner, 'Link')) {
$mode = Versioned::get_reading_mode();
Versioned::set_reading_mode('Stage.Live');
$link = Director::absoluteURL($owner->Link());
Versioned::set_reading_mode($mode);
if(strpos($link, '?') !== false) {
return $link . '&SearchGen=1';
}

0 comments on commit b7ac7d3

Please sign in to comment.