From caf927bc0f1aa8a79cea4476e7a5901e438d760a Mon Sep 17 00:00:00 2001 From: "dietrich@mozilla.com" Date: Mon, 4 Feb 2008 10:10:28 -0800 Subject: [PATCH] Bug 415169 ? Saving searches within bookmark folders is broken (r=mano, a=beltzner) --- browser/components/places/content/places.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/browser/components/places/content/places.js b/browser/components/places/content/places.js index 4598c4bc9d2e..dd5b014e60bd 100755 --- a/browser/components/places/content/places.js +++ b/browser/components/places/content/places.js @@ -290,6 +290,14 @@ var PlacesOrganizer = { return asQuery(this._content.getResult().root).queryOptions; }, + /** + * Returns the queries associated with the query currently loaded in the + * main places pane. + */ + getCurrentQueries: function PO_getCurrentQueries() { + return asQuery(this._content.getResult().root).getQueries({}); + }, + /** * Show the migration wizard for importing from a file. */ @@ -1042,9 +1050,7 @@ var PlacesQueryBuilder = { var searchTermsField = document.getElementById("advancedSearch1Textbox"); if (searchTermsField) setTimeout(function() { searchTermsField.value = PlacesSearchBox.value; }, 10); - var query = PlacesUtils.history.getNewQuery(); - query.searchTerms = PlacesSearchBox.value; - this.queries = [query]; + this.queries = PlacesOrganizer.getCurrentQueries(); return; }