diff options
author | Sergey Kartashoff <gluke@php.net> | 2001-02-05 15:15:09 +0000 |
---|---|---|
committer | Sergey Kartashoff <gluke@php.net> | 2001-02-05 15:15:09 +0000 |
commit | fb057e7ea9165ead016242f849a23d98a29ff1f7 (patch) | |
tree | 82edf8179f49798919b4f97c15e5808622a58b1a /ext/mnogosearch/php_mnogo.c | |
parent | f182245c530301e3d4e4789dd4ef5a8732f3cb57 (diff) | |
download | php-git-fb057e7ea9165ead016242f849a23d98a29ff1f7.tar.gz |
Added new Udm_Clear_Search_Limits mnogosearch extension function.
@- Added Udm_Clear_Search_Limits mnoGoSearch extension function.
Diffstat (limited to 'ext/mnogosearch/php_mnogo.c')
-rw-r--r-- | ext/mnogosearch/php_mnogo.c | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/ext/mnogosearch/php_mnogo.c b/ext/mnogosearch/php_mnogo.c index 97b2dabeae..24fe5abee0 100644 --- a/ext/mnogosearch/php_mnogo.c +++ b/ext/mnogosearch/php_mnogo.c @@ -72,17 +72,20 @@ static int le_link,le_res; function_entry mnogosearch_functions[] = { PHP_FE(udm_alloc_agent, NULL) PHP_FE(udm_set_agent_param, NULL) + PHP_FE(udm_add_search_limit, NULL) - PHP_FE(udm_free_agent, NULL) - + PHP_FE(udm_clear_search_limits, NULL) + PHP_FE(udm_errno, NULL) PHP_FE(udm_error, NULL) PHP_FE(udm_find, NULL) - PHP_FE(udm_free_res, NULL) - PHP_FE(udm_get_res_field, NULL) PHP_FE(udm_get_res_param, NULL) - + PHP_FE(udm_get_res_field, NULL) + + PHP_FE(udm_free_res, NULL) + PHP_FE(udm_free_agent, NULL) + {NULL, NULL, NULL} }; @@ -435,6 +438,32 @@ DLEXPORT PHP_FUNCTION(udm_add_search_limit) /* }}} */ +/* {{{ proto int udm_clear_search_limits(int agent) + Clear all mnoGoSearch search restrictions */ +DLEXPORT PHP_FUNCTION(udm_clear_search_limits) +{ + pval ** yyagent; + UDM_AGENT * Agent; + switch(ZEND_NUM_ARGS()){ + case 1: { + if (zend_get_parameters_ex(1, &yyagent)==FAILURE) { + RETURN_FALSE; + } + } + break; + default: + WRONG_PARAM_COUNT; + break; + } + ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, "mnoGoSearch-Agent", le_link); + + UdmClearLimits(Agent->Conf); + + RETURN_TRUE; +} +/* }}} */ + + /* {{{ proto int udm_find(int agent, string query) Perform search */ DLEXPORT PHP_FUNCTION(udm_find) |