Web Directory Blog » PHPLD Search Function Issue: Fixed

PHPLD Search Function Issue: Fixed

Posted at September 3, 2011

It came to my attention that the search function on the directory was not working. After reports of link owners not being able to find their site via the search bar,I discovered that it was completely broken as no results came up for any keyword or term searched. I found a fix for it and it is now up and running again.

If any other phpld owners have this problem, here is the simple fix.

  • At the very end of search.php, find this code:

$pattern = array ( '/(AND[\s])+/', '/(OR[\s])+/', '/\s+/', '/`+/', '`^[^\w\d]`', '`[^`\w\d]$`' );

  • Replace it with:

$pattern = array ( '#(AND[\s])+#i', '#(OR[\s])+#i', '#[\s]+#', '#[`]+#', '#^[^\w\d]#i', '#[^`\w\d]$#i' );

Cheers!

Comments are closed.