summaryrefslogtreecommitdiff
path: root/ext/mnogosearch
diff options
context:
space:
mode:
authorSergey Kartashoff <gluke@php.net>2001-10-10 17:39:04 +0000
committerSergey Kartashoff <gluke@php.net>2001-10-10 17:39:04 +0000
commitaa9098cd4685e8516711b0152b45248540f1c9aa (patch)
tree36df8064c7e9866b369cfd11927a30a602840b4d /ext/mnogosearch
parent99687096cae7ce2669cf8a7704f4c3ae91acc47d (diff)
downloadphp-git-aa9098cd4685e8516711b0152b45248540f1c9aa.tar.gz
@- Make UDM_PARAM_ISPELL_PREFIXES work under mnogosearch-3.2.x (gluke)
- Make UDM_PARAM_ISPELL_PREFIXES work under mnogosearch-3.2.x (gluke)
Diffstat (limited to 'ext/mnogosearch')
-rw-r--r--ext/mnogosearch/php_mnogo.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/ext/mnogosearch/php_mnogo.c b/ext/mnogosearch/php_mnogo.c
index fb386cb4e8..ed11ff1f42 100644
--- a/ext/mnogosearch/php_mnogo.c
+++ b/ext/mnogosearch/php_mnogo.c
@@ -594,22 +594,36 @@ DLEXPORT PHP_FUNCTION(udm_set_agent_param)
break;
case UDM_PARAM_ISPELL_PREFIXES:
-#if UDM_VERSION_ID < 30200
+
switch (atoi(val)){
case UDM_PREFIXES_ENABLED:
+#if UDM_VERSION_ID < 30200
Agent->Conf->ispell_mode |= UDM_ISPELL_USE_PREFIXES;
+#else
+ UdmAddIntVar(Env->vars, "IspellUsePrefixes", 1, UDM_VARSRC_GLOBAL);
+#endif
break;
case UDM_PREFIXES_DISABLED:
+#if UDM_VERSION_ID < 30200
Agent->Conf->ispell_mode &= ~UDM_ISPELL_USE_PREFIXES;
+#else
+ UdmAddIntVar(Env->vars, "IspellUsePrefixes", 0, UDM_VARSRC_GLOBAL);
+#endif
break;
+
default:
+#if UDM_VERSION_ID < 30200
+ Agent->Conf->ispell_mode |= UDM_ISPELL_USE_PREFIXES;
+#else
+ UdmAddIntVar(Env->vars, "IspellUsePrefixes", 1, UDM_VARSRC_GLOBAL);
+#endif
php_error(E_WARNING,"Udm_Set_Agent_Param: Unknown ispell prefixes mode");
RETURN_FALSE;
break;
}
-#endif
+
break;
case UDM_PARAM_CHARSET: