forum.coppermine-gallery.net
Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Andi on December 12, 2004, 02:46:00 pm
-
Hi :)
search.inc.php,v 1.12 2004/12/08 19:19:03 nibbler999 Exp
By clicking in the keywordmanager on one of the keywords in keywordlist, the following error occurs:
Fatal error: Cannot use string offset as an array in D:\Localhost\dev-Coppermine\vkpmx\vkpmx\html\modules\Gallery\include\search.inc.php on line 47
I've change this code from:
............
$type = " {$_POST['type']} ";
$_POST['params']['pic_hdr_ip'] = $_POST['params']['pic_raw_ip'];
if ($search_string && isset($_POST['params'])) {
$sql = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE ";
$split_search = explode(' ', $search_string);
..........
to this:
.....
$type = " {$_POST['type']} ";
if ($search_string && isset($_POST['params'])) {
$_POST['params']['pic_hdr_ip'] = $_POST['params']['pic_raw_ip'];
$sql = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE ";
$split_search = explode(' ', $search_string);
......
and it's ok.... ;)
-
The keywords system is not compatible with the new search yet.
Edit: should now work as of thumbnails.php v1.23
-
fix confirmed.
Joachim
-
@Nibbler: is there any particular reason (possible security related) to change the search form method from get to post in your advanced search form for cpg1.4.x? I used to post links on my board to URLs that contained a search query (e.g. http://www.mydomain.tld/coppermine/thumbnails.php?album=search&type=full&search=foo+bar) quite often - I find this very helpfull, as I use the keywords to describe who is on the pics. Could the form method be switched back to "get" if there are no security related issues?
Joachim
-
It should still work with get requests, I just find posts are neater, especially with the increased amount of options being used. The url you posted works on my test gallery, do you get an error with that ?
-
No, the url works fine for me as well - it's just that others won't know how to create such an URL, that's why I'm suggesting to use "GET" instead of post - it's part of search form success stories, e.g. google's.
Joachim