[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-tracker] [bug #12502] Error message when searching for mor
From: |
anonymous |
Subject: |
[Phpgroupware-tracker] [bug #12502] Error message when searching for more than 1 word in the knowledge base form |
Date: |
Tue, 29 Mar 2005 18:41:20 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; rv:1.7.3) Gecko/20040913 Firefox/0.10.1 |
URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=12502>
Summary: Error message when searching for more than 1 word
in the knowledge base form
Project: phpGroupWare
Submitted by: None
Submitted on: Tue 03/29/2005 at 13:41
Item Group: 0.9.16.005
Category: knowledge base
Severity: 3 - Normal
Priority: 7 - High
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Component Version: BZIP2
Platform Version: None
Reproducibility: Every Time
Planned Release: None
Fixed Release:
_______________________________________________________
Details:
phpbrain/inc/class.sokb.inc.php has an error on line 342 when attempting to
search for more than 1 word in the search field.
Correction is quite easy, the $cycle variable is not incremented after the
first iteration of the loop.
Original :
Line 322 thru 336 :
foreach($search_words as $id => $word)
{
if($cycle)
{
$title .= "OR title LIKE '%" .
$this->db->db_addslashes($word) . "%' ";
$keywords .= "OR keywords LIKE '%" .
$this->db->db_addslashes($word) .
"%' ";
$text .= "OR text LIKE '%" .
$this->db->db_addslashes($word) . "%' ";
}
else
{
$title .= "(title LIKE '%" .
$this->db->db_addslashes($word) . "%' ";
$keywords .= "(keywords LIKE '%" .
$this->db->db_addslashes($word) . "%'
";
$text .= "(text LIKE '%" .
$this->db->db_addslashes($word) . "%' ";
}
}
Correction, lines 322 thru 337 :
foreach($search_words as $id => $word)
{
if($cycle)
{
$title .= "OR title LIKE '%" .
$this->db->db_addslashes($word) . "%' ";
$keywords .= "OR keywords LIKE '%" .
$this->db->db_addslashes($word) .
"%' ";
$text .= "OR text LIKE '%" .
$this->db->db_addslashes($word) . "%' ";
}
else
{
$title .= "(title LIKE '%" .
$this->db->db_addslashes($word) . "%' ";
$keywords .= "(keywords LIKE '%" .
$this->db->db_addslashes($word) . "%'
";
$text .= "(text LIKE '%" .
$this->db->db_addslashes($word) . "%' ";
}
$cycle=1;
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=12502>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Phpgroupware-tracker] [bug #12502] Error message when searching for more than 1 word in the knowledge base form,
anonymous <=