Closed Bug 1458890 Opened 7 years ago Closed 7 years ago

Change the host wildcard in RemoveByFilter

Categories

(Toolkit :: Places, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: mak, Assigned: mak)

References

Details

(Whiteboard: [fxsearch])

Attachments

(1 file)

See https://bugzilla.mozilla.org/show_bug.cgi?id=1089691#c42 and https://bugzilla.mozilla.org/show_bug.cgi?id=1089691#c44 The current wildcard creates a problem with hosts not having dots, it doesn't make much sense to pass *.localhost to clear localhost
Priority: -- → P2
Whiteboard: [fxsearch]
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Comment on attachment 8973779 [details] Bug 1458890 - Remove the '*' requirement from the host wildcard in History.removeByFilter. https://reviewboard.mozilla.org/r/242148/#review248472 Looks good, now I understand it. ::: commit-message-8994f:1 (Diff revision 1) > +Bug 1458890 - Change the host wildcard in History.removeByFilter. r=standard8 nit: maybe update the message to explain the change of wildcard (e.g. * to .) ::: toolkit/components/places/History.jsm:507 (Diff revision 1) > if (!hasBeginDate && !hasEndDate && !hasHost) { > throw new TypeError("Expected a non-empty filter"); > } > > - // Host should follow one of these formats > - // The first one matches `localhost` or any other custom set in hostsfile > + // Check the host format. > + // Either it has not dots, or has multiple dots, or it's a single dot char. nit: s/not/no/ ::: toolkit/components/places/History.jsm:1167 (Diff revision 1) > hostFilterSQLFragment = > - `h.rev_host between :revHostStart and :revHostEnd`; > + `h.rev_host between :revHost || "." and :revHost || "/"`; > - params.revHostStart = revHost + "."; > - params.revHostEnd = revHost + "/"; > } else { > // This covers the rest (mozilla.org, localhost and local files) nit: comment needs updating as local files are covered by the first if.
Attachment #8973779 - Flags: review?(standard8) → review+
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/2d5c99b70e34 Remove the '*' requirement from the host wildcard in History.removeByFilter. r=standard8
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: