Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Update simplesearchdriverbasic.class.php #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ public function search($str, array $scriptProperties = array()) {
$c->where(array('published:=' => 1), xPDOQuery::SQL_AND, null, $whereGroup);
$c->where(array('searchable:=' => 1), xPDOQuery::SQL_AND, null, $whereGroup);
$c->where(array('deleted:=' => 0), xPDOQuery::SQL_AND, null, $whereGroup);

if($scriptProperties['template']!='')
{
$c->where(array('template:IN' => [$scriptProperties['template']]), xPDOQuery::SQL_AND, null, $whereGroup);
}

/* Restrict to either this context or specified contexts */
$ctx = !empty($this->config['contexts']) ? $this->config['contexts'] : $this->modx->context->get('key');
Expand Down