-
- 102 Posts
Hi
I have exactly the same problem.
Julien
-
- 72 Posts
I have the same problem.
I've changed 2 files and it worked.
core/components/discuss/model/discuss/search/dissearch.class.php
From:
if (!empty($conditions['board'])) $c->where(array('Board.id' => $conditions['board']));
To:
if (!empty($conditions['board'])) $c->where(array('Board.id:IN' => $conditions['board']));
core/components/discuss/controllers/web/search.class.php
From:
$conditions = array();
if (!empty($this->scriptProperties['board'])) {
$conditions['board'] = array($this->scriptProperties['board']);
} else {
$boards = $this->modx->call('disBoard','fetchList',array(&$this->modx));
$c = array();
foreach ($boards as $board) {
$c[] = $board['id'];
}
$c = implode(' OR ',$c);
$conditions['board'] = '('.$c.')';
}
To:
$conditions = array();
if (!empty($this->scriptProperties['board']) && $this->scriptProperties['board'] != '(All Boards)') {
$conditions['board'] = $this->scriptProperties['board'];
} else {
$boards = $this->modx->call('disBoard','fetchList',array(&$this->modx));
$c = array();
foreach ($boards as $board) {
$c[] = $board['id'];
}
$conditions['board'] = $c;
}
[ed. note: wiegers last edited this post 10 years, 10 months ago.]
-
- 131 Posts
Hi wiegers,
I just followed your instruction for modifying some line on the code and it's worked!
Im glad you found the solution. May be on the next release of discuss will fix the problem as what you did.
Thank you very much for your help ;-)
-
- 72 Posts
Hi alyainec,
I'm glad i could help you.
I will make a pull request at Github so it will be fixed the next release.
-
- 32 Posts
Worked for me too. Thanks much!
-
- 81 Posts
This has been fixed in the latest release Discuss 1.2. It is pending to approval to package manager right now. Or hardly can say that it is fixed, the whole search has been improved in terms of speed and all filters from default theme should work. Or at least they worked when last tried.
Also it has Sphinx integration for search, will create documentation to RTFM in near future when I get access to it.