summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Kartashoff <gluke@php.net>2003-07-18 09:15:09 +0000
committerSergey Kartashoff <gluke@php.net>2003-07-18 09:15:09 +0000
commit1674a79e112fefe61b934cd28896648ae7743f8e (patch)
treef9a594b66710246f8825abfe08456b91d814ea2f
parent6f581e803c2e2d20bb8886b73ca84e19551abac3 (diff)
downloadphp-git-1674a79e112fefe61b934cd28896648ae7743f8e.tar.gz
- UDM_PARAM_SORT_ORDER has been added in Udm_Set_Agent_Param while
using with mnogosearch-3.2.14+ to set order of search results.
-rw-r--r--ext/mnogosearch/php_mnogo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/mnogosearch/php_mnogo.c b/ext/mnogosearch/php_mnogo.c
index c44668db5f..a275af7941 100644
--- a/ext/mnogosearch/php_mnogo.c
+++ b/ext/mnogosearch/php_mnogo.c
@@ -85,6 +85,7 @@
#define UDM_PARAM_GROUPBYSITE 27
#define UDM_PARAM_SITEID 28
#define UDM_PARAM_DETECT_CLONES 29
+#define UDM_PARAM_SORT_ORDER 30
/* udm_add_search_limit constants */
#define UDM_LIMIT_URL 1
@@ -322,6 +323,7 @@ DLEXPORT PHP_MINIT_FUNCTION(mnogosearch)
REGISTER_LONG_CONSTANT("UDM_PARAM_QUERY", UDM_PARAM_QUERY,CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("UDM_PARAM_SITEID", UDM_PARAM_SITEID,CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("UDM_PARAM_DETECT_CLONES",UDM_PARAM_DETECT_CLONES,CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("UDM_PARAM_SORT_ORDER",UDM_PARAM_SORT_ORDER,CONST_CS | CONST_PERSISTENT);
/* udm_add_search_limit constants */
REGISTER_LONG_CONSTANT("UDM_LIMIT_CAT", UDM_LIMIT_CAT,CONST_CS | CONST_PERSISTENT);
@@ -1083,6 +1085,13 @@ DLEXPORT PHP_FUNCTION(udm_set_agent_param)
break;
#endif
+#if UDM_VERSION_ID >= 30214
+ case UDM_PARAM_SORT_ORDER:
+ UdmVarListReplaceStr(&Agent->Conf->Vars,"s",val);
+
+ break;
+#endif
+
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Unknown agent session parameter");
RETURN_FALSE;