CCK only - Bogus search engine entries in cck.properties and JS file
This commit is contained in:
mkaply%us.ibm.com 2006-08-03 16:23:40 +00:00
Родитель fed28c4cf6
Коммит 28403d1059
1 изменённых файлов: 12 добавлений и 5 удалений

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

@ -1499,9 +1499,16 @@ function CCKWriteProperties(destdir)
str = str.replace(/%startup.homepage_override_url%/g, document.getElementById("HomePageURL").value);
}
str = str.replace(/%browser.search.defaultenginename%/g, document.getElementById("defaultSearchEngine").value);
str = str.replace(/%browser.search.order.1%/g, document.getElementById("defaultSearchEngine").value);
var bundle = document.getElementById("bundle_cckwizard");
if (document.getElementById("defaultSearchEngine").value != bundle.getString("useBrowserDefault")) {
str = str.replace(/%browser.search.defaultenginename%/g, document.getElementById("defaultSearchEngine").value);
str = str.replace(/%browser.search.order.1%/g, document.getElementById("defaultSearchEngine").value);
} else {
str = str.replace(/%browser.search.defaultenginename%/g, "");
str = str.replace(/%browser.search.order.1%/g, "");
}
str = str.replace(/%PopupAllowedSites%/g, document.getElementById("PopupAllowedSites").value);
str = str.replace(/%InstallAllowedSites%/g, document.getElementById("InstallAllowedSites").value);
cos.writeString(str);
@ -1700,9 +1707,9 @@ function CCKWriteDefaultJS(destdir)
} else if (overrideurl && overrideurl.length) {
fos.write(homepage2, homepage2.length);
}
var bundle = document.getElementById("bundle_cckwizard");
var defaultSearch = document.getElementById("defaultSearchEngine");
if (defaultSearch.value != "") {
if (document.getElementById("defaultSearchEngine").value != bundle.getString("useBrowserDefault")) {
fos.write(searchengine1, searchengine1.length);
fos.write(searchengine2, searchengine2.length);
}