950
Okay... I've had several people successfully "patch" the include/search.inc.php file in both version 1.57 and 1.58 RC so I'll post the changes I made to get the search to work as intended.
The first change makes the search return the title from the xyp_links table instead of the category title. The sql was inadvertently overwriting the title from the xyp_links table with the title from the xyp_cat table since they both have the same name.
Change line 35 FROM:
$sql = "SELECT l.lid,l.cid,l.title,l.submitter,l.date,c.title,t.description FROM ".$xoopsDB->prefix("xyp_links")." l LEFT JOIN ".$xoopsDB->prefix("xyp_cat")." c ON c.cid=l.cid LEFT JOIN ".$xoopsDB->prefix("xyp_text")." t ON t.lid=l.lid WHERE status>0";
TO:
$sql = "SELECT l.lid,l.cid,l.title,l.submitter,l.date,c.title AS cattitle,t.description FROM ".$xoopsDB->prefix("xyp_links")." l LEFT JOIN ".$xoopsDB->prefix("xyp_cat")." c ON c.cid=l.cid LEFT JOIN ".$xoopsDB->prefix("xyp_text")." t ON t.lid=l.lid WHERE status>0";
The second change updates the LIKE terms of the sql statement when the queryarray has more than 1 item. It looks like this was inadvertently left from a "cut and paste" operation.
Change line 45 FROM:
$sql .= "(l.title LIKE '%$queryarray[$i]%' OR c.title LIKE '%$queryarray[0]%' OR t.description LIKE '%$queryarray[$i]%')";
to:
$sql .= "(l.title LIKE '%$queryarray[$i]%' OR c.title LIKE '%$queryarray[$i]%' OR t.description LIKE '%$queryarray[$i]%')";