]> granicus.if.org Git - php/commitdiff
Udm_Api_Version function has been added.
authorSergey Kartashoff <gluke@php.net>
Thu, 1 Mar 2001 13:38:39 +0000 (13:38 +0000)
committerSergey Kartashoff <gluke@php.net>
Thu, 1 Mar 2001 13:38:39 +0000 (13:38 +0000)
Example updated.

ext/mnogosearch/php_mnogo.c
ext/mnogosearch/php_mnogo.h
ext/mnogosearch/test.php

index 5453620bf9ea85c3bb1b75471fe7e1b2f71d22be..f609ccac06fffb9147a581f59334835941ac7920 100644 (file)
@@ -99,6 +99,8 @@ static int le_link,le_res;
 #include <udmsearch.h>
 
 function_entry mnogosearch_functions[] = {
+       PHP_FE(udm_api_version,         NULL)
+
        PHP_FE(udm_alloc_agent,         NULL)
        PHP_FE(udm_set_agent_param,     NULL)
        
@@ -1044,6 +1046,15 @@ DLEXPORT PHP_FUNCTION(udm_error)
 /* }}} */
 
 
+/* {{{ proto int udm_api_version()
+   Get mnoGoSearch API version */
+DLEXPORT PHP_FUNCTION(udm_api_version)
+{
+       RETURN_LONG(UDM_VERSION_ID);
+}
+/* }}} */
+
+
 #if UDM_VERSION_ID > 30110
 /* {{{ proto int udm_get_doc_count(int agent)
    Get total number of documents in database */
index 34a85d39270b603aa55c8648715d2b7e598a24f5..948aca95229a24d719fa679928d558f8cd2c9745 100644 (file)
@@ -49,6 +49,8 @@ DLEXPORT PHP_RINIT_FUNCTION(mnogosearch);
 DLEXPORT PHP_MSHUTDOWN_FUNCTION(mnogosearch);
 DLEXPORT PHP_MINFO_FUNCTION(mnogosearch);
 
+DLEXPORT PHP_FUNCTION(udm_api_version);
+
 DLEXPORT PHP_FUNCTION(udm_alloc_agent);
 DLEXPORT PHP_FUNCTION(udm_set_agent_param);
 
index b4dce3470a3b3bc2ee0df0003eddf3dc571c112f..2c77e614d390ecbc90e3d455fe515d94b749b0b1 100644 (file)
@@ -6,6 +6,9 @@
 <html>
 <body>
 
+mnoGoSearch API version: <? echo Udm_Api_Version(); ?>
+<br>
+
 <form method=post>
 <input type=text size=30 name=q value="<? echo htmlspecialchars(stripslashes($q)); ?>">
 <input type=submit value=" Search ! ">