diff --git a/www/searchFunc.js b/www/searchFunc.js index 7b6efd493974d9ce2adc6ad65be313a3a4b46ef7..dca541857ff17752a7f043b7240ab6f0b65c8c6f 100644 --- a/www/searchFunc.js +++ b/www/searchFunc.js @@ -33,6 +33,11 @@ function searchInit() { if (UNL_Search.do_local_search) { var local_search = new google.search.CustomSearchControl(UNL_Search.local_search_context); + // WARNING: The following code is an undocumented method of the Google API + // and appears to be on the deprication list, but it fixes a MAJOR bug in + // that prevents the use of linked CSE's + local_search.getWebSearcher().setSiteRestriction(UNL_Search.local_search_context); + // end hack local_search.setResultSetSize('small'); local_search.setSearchCompleteCallback(UNL_Search, UNL_Search.onSearchComplete); local_search.draw('local_results', drawOp);