Search with empty property fields returns no match
- APCLO
- Topic Author
- Offline
- New Member
Less
More
10 years 6 months ago #1833
by APCLO
The greatness of a nation and its moral progress can be judged by the way its animals are treated --- Gandhi
Search with empty property fields returns no match was created by APCLO
Hello,
this is something I had already seen in the previous version but never asked about.
When you use the search module and no property field is filled in, the result is the message saying "Please make some selections".
I bound my search to a specific category and would like to get all the articles belonging to it if no value is entered.
Would it be possible to set up the module in order to display all of the articles if any property value is entered?
Thanks
Silvia
this is something I had already seen in the previous version but never asked about.
When you use the search module and no property field is filled in, the result is the message saying "Please make some selections".
I bound my search to a specific category and would like to get all the articles belonging to it if no value is entered.
Would it be possible to set up the module in order to display all of the articles if any property value is entered?
Thanks
Silvia
The greatness of a nation and its moral progress can be judged by the way its animals are treated --- Gandhi
Please Log in or Create an account to join the conversation.
- openwire
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 1
10 years 5 months ago #1846
by openwire
Replied by openwire on topic Search with empty property fields returns no match
It turned to be easy:
in /administrator/components/com_customproperties/helpers/cpquery.class.php, in getRows function around line 700 there's code looking like this:
swap these two conditions so it looks like
Now category filter is treated like other filters and query doesn't get halted.
I'd love to see this implemented in next releases at least as an option.
Cheers,
Kostya
in /administrator/components/com_customproperties/helpers/cpquery.class.php, in getRows function around line 700 there's code looking like this:
Code:
if(! count($search_pars) > 0 )
{
array_push($this->errors, "no pars");
return false;
}
if(!empty($bind_to_categories ))
{
$search_pars['bind_to_category'] = $bind_to_categories;
}
swap these two conditions so it looks like
Code:
if(!empty($bind_to_categories ))
{
$search_pars['bind_to_category'] = $bind_to_categories;
}
if(! count($search_pars) > 0 )
{
array_push($this->errors, "no pars");
return false;
}
Now category filter is treated like other filters and query doesn't get halted.
I'd love to see this implemented in next releases at least as an option.
Cheers,
Kostya
The following user(s) said Thank You: APCLO
Please Log in or Create an account to join the conversation.
- APCLO
- Topic Author
- Offline
- New Member
9 years 6 months ago #2232
by APCLO
The greatness of a nation and its moral progress can be judged by the way its animals are treated --- Gandhi
Replied by APCLO on topic Search with empty property fields returns no match
thank you Kostya!
The greatness of a nation and its moral progress can be judged by the way its animals are treated --- Gandhi
Please Log in or Create an account to join the conversation.
Time to create page: 0.124 seconds