[FIXED] - Search Results do not abide by "limit" and code clean-up - Joomla! Forum - community, help and support


description:
[user] when searches site, "limit" field applies each query , not search whole. follow explains how make "search limit" more estimate.

there switch statement @ end merged arrays. 22 lines long , allowed $rows[0] thru $rows[3] (which works fine now, not efficient be). changed foreach statement cleaner accept number of arrays. 10 lines now.

reported on:

[user] joomla 1.5 svn 9097 (10-2-2007)

classification:
[q&t] critical/high/medium/low/enhancement

affected functions:
[user] content search

related files:
[user] \plugins\search\content.php

steps replicate:
[user] using default joomla! 1.5 installation, change content search mambot's search limit "5". go front-end , search content "menu". pulls 5 categorized articles, , 1 uncategorized article.

analysis:
[q&t] confirmed/unable confirm/rejected
any other comments

proposed fix(es):
[user] after each query, use "count()" function on $list# variable see how many results returned. subtract $limit variable. also, on each query block, check see if $limit greater 0 before executing. since if $limit becomes negative, still execute query , return results. also, want step on unneeded mysql calls.

patched file attached.

topic / artifact id:
[user] n/a

system info:
[user] n/a

fix applied.





Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor