]> granicus.if.org Git - php/commitdiff
- a new UDM_PARAM_SEARCH_RESULTS mnogosearch API command added to limit
authorSergey Kartashoff <gluke@php.net>
Sun, 31 Aug 2003 07:00:29 +0000 (07:00 +0000)
committerSergey Kartashoff <gluke@php.net>
Sun, 31 Aug 2003 07:00:29 +0000 (07:00 +0000)
  maximum number of search results

ext/mnogosearch/php_mnogo.c

index 487198623d563b6e275a8f3546e7df8c3a39d2f0..7930a7784c2e4b533166dee7f586c21b7144945c 100644 (file)
@@ -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;