# HG changeset patch # User Dan # Date 1198773300 18000 # Node ID 5d62ef764b0dcbd2e1814e7eb6e6e60fba3270d0 # Parent 915d399dfdbfebad4f41cd3f49ab56837dca956f Fixed search indexer causing duplicate keys when two "words" of 64+ characters encountered and first 64 characters are the same (thanks Vadi); attempt to fix onunload confirmation during page editing diff -r 915d399dfdbf -r 5d62ef764b0d includes/clientside/static/misc.js --- a/includes/clientside/static/misc.js Sun Dec 23 17:58:21 2007 -0500 +++ b/includes/clientside/static/misc.js Thu Dec 27 11:35:00 2007 -0500 @@ -125,7 +125,8 @@ if(typeof message != 'string') message = 'You may want to save your changes first.'; var body = document.getElementsByTagName('body'); body = body[0]; - body.onbeforeunload='return unescape(\''+escape(message)+'\')'; + body._unloadmsg = message; + body.onbeforeunload = function() { return this._unloadmsg }; } function enableUnload() @@ -133,6 +134,7 @@ var body = document.getElementsByTagName('body'); body = body[0]; body.onbeforeunload = null; + body._unloadmsg = null; } /** diff -r 915d399dfdbf -r 5d62ef764b0d includes/search.php --- a/includes/search.php Sun Dec 23 17:58:21 2007 -0500 +++ b/includes/search.php Thu Dec 27 11:35:00 2007 -0500 @@ -75,7 +75,7 @@ $words = explode(' ', $letters); foreach($words as $c => $w) { - if(strlen($w) < 2 || in_array($w, $stopwords)) + if(strlen($w) < 2 || in_array($w, $stopwords) || strlen($w) > 63) unset($words[$c]); else $words[$c] = $w;