<div class="contentNavigation">
{assign var=encodedHighlight value=$highlight|urlencode}
- {pages print=true assign=pagesLinks controller='SearchResult' id=$searchID link="pageNo=%d&highlight=$encodedHighlight"}
+ {pages print=true application=$application assign=pagesLinks controller='SearchResult' id=$searchID link="pageNo=%d&highlight=$encodedHighlight"}
{hascontent}
<nav>
namespace wcf\form;
use wcf\data\search\Search;
use wcf\data\search\SearchAction;
+use wcf\system\application\ApplicationHandler;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\NamedUserException;
}
$this->saved();
+ // get application
+ $application = 'wcf';
+ if (count($this->selectedObjectTypes) == 1) {
+ $objectType = SearchEngine::getInstance()->getObjectType(reset($this->selectedObjectTypes));
+ if ($tmp = ApplicationHandler::getInstance()->getAbbreviation($objectType->packageID)) {
+ $application = $tmp;
+ }
+ }
+
// forward to result page
- HeaderUtil::redirect(LinkHandler::getInstance()->getLink('SearchResult', array('id' => $this->searchID), 'highlight='.urlencode($this->query)));
+ HeaderUtil::redirect(LinkHandler::getInstance()->getLink('SearchResult', array(
+ 'id' => $this->searchID,
+ 'application' => $application
+ ), 'highlight='.urlencode($this->query)));
exit;
}
namespace wcf\page;
use wcf\data\search\ISearchResultObject;
use wcf\data\search\Search;
+use wcf\system\application\ApplicationHandler;
use wcf\system\breadcrumb\Breadcrumb;
use wcf\system\event\EventHandler;
use wcf\system\exception\IllegalLinkException;
'alterable' => (!empty($this->searchData['alterable']) ? 1 : 0),
'objectTypes' => SearchEngine::getInstance()->getAvailableObjectTypes(),
'resultListTemplateName' => $this->resultListTemplateName,
- 'resultListApplication' => $this->resultListApplication
+ 'resultListApplication' => $this->resultListApplication,
+ 'application' => ApplicationHandler::getInstance()->getAbbreviation(ApplicationHandler::getInstance()->getActiveApplication()->packageID)
));
}