6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
8/31/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#12272] Search-all and strict fields
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ __.\ /\ / __. | \(__ >< >< (__ |__/.__)/ \/ \.__)
Comment
> If in the default sql addressbook an additional field is declared as > strict, the resulting sql-statement > is wrong. Add for example object_email to the strict-array and do a > search-all for a valid email. > > All -> a@b.c.d > > This results in the following query: > SELECT object_id, owner_id, object_type, object_members, object_uid, > object_firstname, object_lastname, object_middlenames, > object_nameprefix, object_namesuffix, object_alias, object_bday, > object_photo, object_phototype, object_homestreet, object_homepob, > object_homecity, object_homeprovince, object_homepostalcode, > object_homecountry, object_workstreet, object_workpob, > object_workcity, object_workprovince, object_workpostalcode, > object_workcountry, object_tz, object_email, object_homephone, > object_workphone, object_cellphone, object_fax, object_pager, > object_title, object_role, object_company, object_logo, > object_logotype, object_category, object_notes, object_url, > object_freebusyurl, object_pgppublickey, object_smimepublickey FROM > turba_objects WHERE (object_email = 'a@b.c.d' OR owner_id = > 'kd' AND > ((LOWER(object_nameprefix) LIKE LOWER('%a@b.c.d%') OR > LOWER(object_firstname) LIKE LOWER('%a@b.c.d%') OR > LOWER(object_middlenames) LIKE LOWER('%a@b.c.d%') OR > LOWER(object_lastname) LIKE LOWER('%a@b.c.d%') OR > LOWER(object_namesuffix) LIKE LOWER('%a@b.c.d%')))) > > This is wrong. > I believe, this is caused by always adding "owner_id = user" as a > strict search (in Driver.php - search). > It can be solved by "anding" the "owner_id = user" _after_ the > search is build (makeSearch). > A possible patch is attached. > Probably this is related to Bug #12089. >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers