More changes for bug # 24959: sidebar search panel changes.

This commit is contained in:
rjc%netscape.com 2006-09-14 05:44:09 +00:00
Родитель 4c765cfe10
Коммит 2ca27ba03a
1 изменённых файлов: 16 добавлений и 12 удалений

Просмотреть файл

@ -546,25 +546,29 @@ function OpenSearch(tabName, forceDialogFlag, searchStr)
{
if ((!searchStr) || (searchStr == "")) return;
var searchDS = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService();
if (searchDS) searchDS = searchDS.QueryInterface(Components.interfaces.nsIInternetSearchService);
var escapedSearchStr = escape(searchStr);
defaultSearchURL += escapedSearchStr;
if ((searchEngineURI != null) && (searchEngineURI != ""))
if (searchDS)
{
try
searchDS.RememberLastSearchText(escapedSearchStr);
if ((searchEngineURI != null) && (searchEngineURI != ""))
{
var searchURL = null;
var searchDS = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService();
if (searchDS) searchDS = searchDS.QueryInterface(Components.interfaces.nsIInternetSearchService);
if (searchDS) searchURL = searchDS.GetInternetSearchURL(searchEngineURI, escapedSearchStr);
if ((searchURL != null) && (searchURL != ""))
try
{
var searchURL = searchDS.GetInternetSearchURL(searchEngineURI, escapedSearchStr);
if ((searchURL != null) && (searchURL != ""))
{
defaultSearchURL = searchURL;
}
}
catch(ex)
{
defaultSearchURL = searchURL;
}
}
catch(ex)
{
}
}
window.content.location.href = defaultSearchURL;