Added support for searching for brands and fixed a bug where the query was presented in translated form to the user
This commit is contained in:
parent
720551af8d
commit
59395ad311
@ -8,7 +8,7 @@ class SearchPage extends Page {
|
||||
if(isset($_GET['q']) && !$_GET['q']) {
|
||||
unset($_GET['q']);
|
||||
}
|
||||
$this->terms = $this->translate_keys($_GET);
|
||||
$this->terms = $_GET;
|
||||
}
|
||||
|
||||
private function do_search() {
|
||||
@ -17,7 +17,7 @@ class SearchPage extends Page {
|
||||
return $out;
|
||||
}
|
||||
foreach(array('user', 'product') as $type) {
|
||||
$result = $this->search($type, $this->terms);
|
||||
$result = $this->search($type, $this->translate_keys($this->terms));
|
||||
if($result) {
|
||||
$out[$type] = $result;
|
||||
}
|
||||
@ -33,6 +33,10 @@ class SearchPage extends Page {
|
||||
case 'q':
|
||||
$newkey = 'fritext';
|
||||
break;
|
||||
case 'tillverkare':
|
||||
case 'märke':
|
||||
$newkey = 'brand';
|
||||
break;
|
||||
case 'namn':
|
||||
$newkey = 'name';
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user