cvs: phpweb / search.php userprefs.js

From: Date: Wed, 06 Sep 2006 12:52:58 +0000
Subject: cvs: phpweb / search.php userprefs.js
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-32344@lists.php.net to get a copy of this message
goba Wed Sep 6 12:52:58 2006 UTC Modified files: /phpweb search.php userprefs.js Log: history restoration was deemed harmful http://cvs.php.net/viewvc.cgi/phpweb/search.php?r1=1.110&r2=1.111&diff_format=u Index: phpweb/search.php diff -u phpweb/search.php:1.110 phpweb/search.php:1.111 --- phpweb/search.php:1.110 Wed Mar 15 05:50:34 2006 +++ phpweb/search.php Wed Sep 6 12:52:57 2006 @@ -1,5 +1,5 @@ <?php -// $Id: search.php,v 1.110 2006/03/15 05:50:34 rasmus Exp $ +// $Id: search.php,v 1.111 2006/09/06 12:52:57 goba Exp $ $_SERVER['BASE_PAGE'] = 'search.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; @@ -37,9 +37,6 @@ // 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']); http://cvs.php.net/viewvc.cgi/phpweb/userprefs.js?r1=1.15&r2=1.16&diff_format=u Index: phpweb/userprefs.js diff -u phpweb/userprefs.js:1.15 phpweb/userprefs.js:1.16 --- phpweb/userprefs.js:1.15 Sun Apr 2 14:10:19 2006 +++ phpweb/userprefs.js Wed Sep 6 12:52:57 2006 @@ -1,8 +1,6 @@ // Default document onload function function runOnLoad() { - // Disabled because of complaints - // searchHistory(); resizeColumnsIE(); } @@ -48,35 +46,6 @@ } } -// 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

« previous php.mirrors (#32344) next »