From cc4d7cd980c6428337fa27e79bc71f22679e214d Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Wed, 6 Sep 2006 12:52:57 +0000 Subject: [PATCH] history restoration was deemed harmful --- search.php | 3 --- userprefs.js | 31 ------------------------------- 2 files changed, 34 deletions(-) diff --git a/search.php b/search.php index 0af8965ec..f68f789d5 100644 --- a/search.php +++ b/search.php @@ -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']); diff --git a/userprefs.js b/userprefs.js index 4b56e7965..ede4214dc 100644 --- a/userprefs.js +++ b/userprefs.js @@ -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