cvs: phpweb / userprefs.js
| From: | Gabor Hojtsy | Date: | Sat, 07 Jun 2003 07:55:46 +0000 |
| Subject: | cvs: phpweb / userprefs.js | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-18557@lists.php.net to get a copy of this message | ||
goba Sat Jun 7 03:55:46 2003 EDT
Modified files:
/phpweb userprefs.js
Log:
If something is already typed in, then skip this
Index: phpweb/userprefs.js
diff -u phpweb/userprefs.js:1.3 phpweb/userprefs.js:1.4
--- phpweb/userprefs.js:1.3 Fri Jun 6 14:52:46 2003
+++ phpweb/userprefs.js Sat Jun 7 03:55:46 2003
@@ -43,6 +43,11 @@
// 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") {