1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

history restoration was deemed harmful

This commit is contained in:
Gabor Hojtsy
2006-09-06 12:52:57 +00:00
parent ed160c0c38
commit cc4d7cd980
2 changed files with 0 additions and 34 deletions

View File

@@ -37,9 +37,6 @@ if (!empty($_FORM['pattern'])) {
// Never allow a comma in the show string, that would confuse our JS
$_FORM['show'] = str_replace(",", "", $_FORM['show']);
// Remember the last search settings for a week
mirror_setcookie("LAST_SEARCH", "{$_FORM['show']},{$_FORM['pattern']}", 60*60*24*7);
// Mailing list search base URL
$ml_url = "http://marc.theaimsgroup.com/?r=1&w=2&q=b&";
$ucp = urlencode($_FORM['pattern']);

View File

@@ -1,8 +1,6 @@
// Default document onload function
function runOnLoad()
{
// Disabled because of complaints
// searchHistory();
resizeColumnsIE();
}
@@ -48,35 +46,6 @@ function boldEvents()
}
}
// Restore the last search as stored in a cookie
function searchHistory()
{
// Something is already typed in, do not try to overwrite it
if (document.forms["topsearch"].pattern.value.length > 0) {
return;
}
// Try to get the lastsearch cookie
lastSearch = getCookie("LAST_SEARCH");
if (typeof(lastSearch) == "string") {
// Get pattern and show information from cookie
option = lastSearch.substr(0, lastSearch.indexOf(","));
pattern = lastSearch.substr(lastSearch.indexOf(",") + 1);
// Set pattern in form
document.forms["topsearch"].pattern.value = unescape(pattern.replace(/\+/g," "));
// Set the last selected search method in the dropdown
for (var i = 0; i < document.forms["topsearch"].show.length; i++) {
if (document.forms["topsearch"].show[i].value == option) {
document.forms["topsearch"].show[i].selected = true;
break;
}
}
}
}
// This function is a workaround for the IE 3px bug,
// and therefore is written in IE only JS. If the central
// column is higher than the left or right sidebar, we need