From 87b1b370723b7a98d8d70df0359a32185b670900 Mon Sep 17 00:00:00 2001 From: "mike.morgan%oregonstate.edu" Date: Wed, 19 Apr 2006 21:23:05 +0000 Subject: [PATCH] Checked in changes to search so descriptions are searched as well as titles. See bug 334713. --- webtools/addons/public/htdocs/search.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webtools/addons/public/htdocs/search.php b/webtools/addons/public/htdocs/search.php index fbad027a75f5..cfae8f65c13a 100644 --- a/webtools/addons/public/htdocs/search.php +++ b/webtools/addons/public/htdocs/search.php @@ -167,7 +167,8 @@ if (!empty($sql['appfilter'])) { } if (!empty($sql['q'])) { - $where .= " main.Name LIKE '%{$sql['q']}%' AND "; + $where .= " (main.name LIKE '%" . preg_replace('/[\s]+/','%',$sql['q']) . "%' + OR main.Description LIKE '%" . preg_replace('/[\s]+/','%',$sql['q']) . "%') AND "; } if (!empty($sql['type'])) {