From: Sergey Kartashoff Date: Sat, 3 Nov 2001 22:37:50 +0000 (+0000) Subject: @- mnoGoSearch module example updates for 3.2.x compatibility X-Git-Tag: ChangeLog~430 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=411725b01c7b6a099ac43467afde8c10809b5b36;p=php @- mnoGoSearch module example updates for 3.2.x compatibility - mnoGoSearch module example updates for 3.2.x compatibility --- diff --git a/ext/mnogosearch/index.php b/ext/mnogosearch/index.php index e88931b0f8..7d4abf6b1c 100644 --- a/ext/mnogosearch/index.php +++ b/ext/mnogosearch/index.php @@ -5,7 +5,7 @@ , * mnoGoSearch Developers Team @@ -32,6 +32,7 @@ $dbaddr='mysql://udm:udm@/udm/'; $dbmode='single'; $localcharset='koi8-r'; +$browsercharset='utf-8'; $phrase=$cache=$crosswords='no'; $ispelluseprefixes=$trackquery='no'; $spell_host=$vardir=$datadir=''; @@ -545,17 +546,28 @@ function make_nav($query_orig){ Udm_Set_Agent_Param($udm_agent,UDM_PARAM_CHARSET,$localcharset); } - if (Udm_Api_Version() >= 30200) { + if (Udm_Api_Version() >= 30200) { if ($localcharset == '') Udm_Set_Agent_Param($udm_agent,UDM_PARAM_CHARSET,'utf-8'); if ($browsercharset != '') { Udm_Set_Agent_Param($udm_agent,UDM_PARAM_BROWSER_CHARSET,$browsercharset); - Header ("Content-Type: text/html; charset=$browsercharset"); ?> + Header ("Content-Type: text/html; charset=$browsercharset"); } else { Udm_Set_Agent_Param($udm_agent,UDM_PARAM_BROWSER_CHARSET,'utf-8'); - Header ("Content-Type: text/html; charset=utf-8"); ?> + Header ("Content-Type: text/html; charset=utf-8"); } + if ($hlbeg != '') { + Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLBEG,$hlbeg); + } else { + Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLBEG,''); + } + if ($hlend != '') { + Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLEND,$hlend); + } else { + Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLEND,''); + } } + for ($i=0; $i < count($stopwordtable_arr); $i++) { if ($stopwordtable_arr[$i] != '') { Udm_Set_Agent_Param($udm_agent,UDM_PARAM_STOPTABLE,$stopwordtable_arr[$i]);