From: Sergey Kartashoff Date: Sun, 31 Aug 2003 07:00:29 +0000 (+0000) Subject: - a new UDM_PARAM_SEARCH_RESULTS mnogosearch API command added to limit X-Git-Tag: RELEASE_0_7~340 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4b0b8c26237fb1e533446ff78878cb8c0be5810;p=php - a new UDM_PARAM_SEARCH_RESULTS mnogosearch API command added to limit maximum number of search results --- diff --git a/ext/mnogosearch/php_mnogo.c b/ext/mnogosearch/php_mnogo.c index 487198623d..7930a7784c 100644 --- a/ext/mnogosearch/php_mnogo.c +++ b/ext/mnogosearch/php_mnogo.c @@ -86,6 +86,7 @@ #define UDM_PARAM_SITEID 28 #define UDM_PARAM_DETECT_CLONES 29 #define UDM_PARAM_SORT_ORDER 30 +#define UDM_PARAM_RESULTS_LIMIT 31 /* udm_add_search_limit constants */ #define UDM_LIMIT_URL 1 @@ -324,6 +325,7 @@ DLEXPORT PHP_MINIT_FUNCTION(mnogosearch) 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); + REGISTER_LONG_CONSTANT("UDM_PARAM_RESULTS_LIMIT",UDM_PARAM_RESULTS_LIMIT,CONST_CS | CONST_PERSISTENT); /* udm_add_search_limit constants */ REGISTER_LONG_CONSTANT("UDM_LIMIT_CAT", UDM_LIMIT_CAT,CONST_CS | CONST_PERSISTENT); @@ -1100,6 +1102,12 @@ DLEXPORT PHP_FUNCTION(udm_set_agent_param) break; #endif +#if UDM_VERSION_ID >= 30215 + case UDM_PARAM_RESULTS_LIMIT: + UdmVarListReplaceStr(&Agent->Conf->Vars,"ResultsLimit",val); + + break; +#endif default: php_error_docref(NULL TSRMLS_CC, E_WARNING,"Unknown agent session parameter"); RETURN_FALSE;