Make os_disableSuggestionsOn() work also when called before mwsuggest.js has even...
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 11 Sep 2009 21:03:54 +0000 (21:03 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 11 Sep 2009 21:03:54 +0000 (21:03 +0000)
includes/DefaultSettings.php
skins/common/mwsuggest.js

index 2a85f4e..dae79e0 100644 (file)
@@ -1591,7 +1591,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches do not keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '239';
+$wgStyleVersion = '240';
 
 
 # Server-side caching:
index 77792b0..57844ff 100644 (file)
@@ -840,6 +840,11 @@ function os_disableSuggestionsOn(inputId){
                // remove descriptor
                os_map[inputId] = null;
        }
+       
+       // Remove the element from the os_autoload_* arrays
+       var index = os_autoload_inputs.indexOf(inputId);
+       if ( index >= 0 )
+               os_autoload_inputs[index] = os_autoload_forms[index] = '';
 }
 
 /** Initialization, call upon page onload */