summaryrefslogtreecommitdiff
path: root/ext/mnogosearch
diff options
context:
space:
mode:
authorSergey Kartashoff <gluke@php.net>2001-11-03 22:37:50 +0000
committerSergey Kartashoff <gluke@php.net>2001-11-03 22:37:50 +0000
commit411725b01c7b6a099ac43467afde8c10809b5b36 (patch)
treec21d90e8dbe5bc09a478e8b47a15a88d61667ad7 /ext/mnogosearch
parenteb4754441f70e1c81d87802f730eb815c75e892d (diff)
downloadphp-git-411725b01c7b6a099ac43467afde8c10809b5b36.tar.gz
@- mnoGoSearch module example updates for 3.2.x compatibility
- mnoGoSearch module example updates for 3.2.x compatibility
Diffstat (limited to 'ext/mnogosearch')
-rw-r--r--ext/mnogosearch/index.php20
1 files changed, 16 insertions, 4 deletions
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-php-lite v.1.0
+/* mnoGoSearch-php-lite v.1.1
* for mnoGoSearch ( formely known as UdmSearch ) free web search engine
* (C) 2001 by Sergey Kartashoff <gluke@mail.ru>,
* mnoGoSearch Developers Team <devel@mnogosearch.org>
@@ -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,'<font color="000088"><b>');
+ }
+ if ($hlend != '') {
+ Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLEND,$hlend);
+ } else {
+ Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLEND,'</b></font>');
+ }
}
+
for ($i=0; $i < count($stopwordtable_arr); $i++) {
if ($stopwordtable_arr[$i] != '') {
Udm_Set_Agent_Param($udm_agent,UDM_PARAM_STOPTABLE,$stopwordtable_arr[$i]);