Problems with apostrophizes

Started by pascal7, 25 August 2014, 09:11:49

Previous topic - Next topic
A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

pascal7

Hello, I have a problem with the system of search. When I make a search with apostrophizes > ' <, the system of search does not function !


Pascal

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

federica

Ho pascal,
I fix this bug in the next relase. I you want fix the bug yourself, change this file.
your_site/components/com_abook/models/search.php
line 157
From
$query->where('LOWER( a.title ) LIKE "%'.$this->getState('filter.search').'%"');

to
$query->where('LOWER( a.title ) LIKE "%'.$db->escape($this->getState('filter.search')).'%"');
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

pascal7

Ok, thank You, But i am using the joomla 2.5 version, sorry !

PLease ! Help me !

My website www.cheyne-editeur.com

Pascal

federica

your_site/components/com_abook/models/search.php
line 90
from:
$searchparamid['keyword']= "((a.title LIKE '%" .$this->getState('keyword') ."%') OR (a.subtitle LIKE '%" .$this->getState('keyword') ."%') OR (a.description LIKE '%" .$this->getState('keyword') ."%') OR (cat.title LIKE '%" .$this->getState('keyword') ."%') OR (a.catalogo LIKE '%" .$this->getState('keyword') ."%'))";

to:
$searchparamid['keyword']= "((a.title LIKE '%" .$db->escape($this->getState('keyword')) ."%') OR (a.subtitle LIKE '%" .$db->escape($this->getState('keyword')) ."%') OR (a.description LIKE '%" .$db->escape($this->getState('keyword')) ."%') OR (cat.title LIKE '%" .$db->escape($this->getState('keyword')) ."%') OR (a.catalogo LIKE '%" .$db->escape($this->getState('keyword')) ."%'))";
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

pascal7

Thank You but it's not ok...

Fatal error: Call to a member function escape() on a non-object in /homepages/5/d342551515/htdocs/cheyne/components/com_abook/models/search.php on line 90

Pascal

federica

Can you tell me both joomla version and abook version?
I installed joomla 2.5.18 and abook 2.0.4 and the search with apostrophizes works fine without modify anything.
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

pascal7

Joomla 2.5.9 and abook 2.0.4 ...