[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Sun Jan 23 10:01:20 2005 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - A bug in mnogosearch module in ispell loading code was fixed http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.95r2=1.96ty=u Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.95 php-src/ext/mnogosearch/php_mnogo.c:1.96 --- php-src/ext/mnogosearch/php_mnogo.c:1.95Sun Nov 28 15:03:04 2004 +++ php-src/ext/mnogosearch/php_mnogo.c Sun Jan 23 10:01:18 2005 @@ -1,5 +1,5 @@ /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.95 2004/11/28 20:03:04 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.96 2005/01/23 15:01:18 gluke Exp $ */ /* +--+ @@ -1279,6 +1279,18 @@ UdmSortAffixes(Agent-Conf); } #endif +#else + if(Agent-Conf-Spells.nitems Agent-Conf-Affixes.nitems) { + char *err= Agent-Conf-errstr; + int flags= strcasecmp(UdmVarListFindStr(Agent-Conf-Vars, + IspellUsePrefixes,no),no); + flags= flags ? 0 : UDM_SPELL_NOPREFIX; + if (UdmSpellListListLoad(Agent-Conf-Spells, err, 128) || + UdmAffixListListLoad(Agent-Conf-Affixes, flags, err, 128)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING,Error loading ispell data); + RETURN_FALSE; + } + } #endif } @@ -2000,7 +2012,7 @@ Perform search */ DLEXPORT PHP_FUNCTION(udm_find) { - pval ** yyquery, ** yyagent; + pval ** yyquery=NULL, ** yyagent; UDM_RESULT * Res; UDM_AGENT * Agent; int id=-1; @@ -2031,6 +2043,9 @@ if ((Res=UdmFind(Agent,UdmTolower(Z_STRVAL_PP(yyquery),Agent-charset { #else #if UDM_VERSION_ID = 30213 + if ((yyquery) (strlen(Z_STRVAL_PP(yyquery + UdmVarListReplaceStr(Agent-Conf-Vars, q, + Z_STRVAL_PP(yyquery)); if ((Res=UdmFind(Agent))) { #else if ((Res=UdmFind(Agent,Z_STRVAL_PP(yyquery { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mnogosearch php_mnogo.c
gluke Sun Jan 23 10:01:45 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/mnogosearchphp_mnogo.c Log: - A bug in mnogosearch module in ispell loading code was fixed http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.90.2.5r2=1.90.2.6ty=u Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.90.2.5 php-src/ext/mnogosearch/php_mnogo.c:1.90.2.6 --- php-src/ext/mnogosearch/php_mnogo.c:1.90.2.5Sun Nov 28 15:03:59 2004 +++ php-src/ext/mnogosearch/php_mnogo.c Sun Jan 23 10:01:44 2005 @@ -1,5 +1,5 @@ /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.90.2.5 2004/11/28 20:03:59 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.90.2.6 2005/01/23 15:01:44 gluke Exp $ */ /* +--+ @@ -1279,6 +1279,18 @@ UdmSortAffixes(Agent-Conf); } #endif +#else + if(Agent-Conf-Spells.nitems Agent-Conf-Affixes.nitems) { + char *err= Agent-Conf-errstr; + int flags= strcasecmp(UdmVarListFindStr(Agent-Conf-Vars, + IspellUsePrefixes,no),no); + flags= flags ? 0 : UDM_SPELL_NOPREFIX; + if (UdmSpellListListLoad(Agent-Conf-Spells, err, 128) || + UdmAffixListListLoad(Agent-Conf-Affixes, flags, err, 128)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING,Error loading ispell data); + RETURN_FALSE; + } + } #endif } @@ -2000,7 +2012,7 @@ Perform search */ DLEXPORT PHP_FUNCTION(udm_find) { - pval ** yyquery, ** yyagent; + pval ** yyquery=NULL, ** yyagent; UDM_RESULT * Res; UDM_AGENT * Agent; int id=-1; @@ -2031,6 +2043,9 @@ if ((Res=UdmFind(Agent,UdmTolower(Z_STRVAL_PP(yyquery),Agent-charset { #else #if UDM_VERSION_ID = 30213 + if ((yyquery) (strlen(Z_STRVAL_PP(yyquery + UdmVarListReplaceStr(Agent-Conf-Vars, q, + Z_STRVAL_PP(yyquery)); if ((Res=UdmFind(Agent))) { #else if ((Res=UdmFind(Agent,Z_STRVAL_PP(yyquery { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Sun Nov 28 15:03:05 2004 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - MnoGoSearch extension updated to fix compilation issues with mnogosearch-3.2.25+ http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.94r2=1.95ty=u Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.94 php-src/ext/mnogosearch/php_mnogo.c:1.95 --- php-src/ext/mnogosearch/php_mnogo.c:1.94Mon Nov 15 14:03:19 2004 +++ php-src/ext/mnogosearch/php_mnogo.c Sun Nov 28 15:03:04 2004 @@ -1,5 +1,5 @@ /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.94 2004/11/15 19:03:19 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.95 2004/11/28 20:03:04 gluke Exp $ */ /* +--+ @@ -1214,43 +1214,48 @@ #endif case UDM_ISPELL_TYPE_AFFIX: -#if UDM_VERSION_ID 30200 +#if UDM_VERSION_ID 30200 Agent-Conf-ispell_mode = ~UDM_ISPELL_MODE_DB; - #if UDM_VERSION_ID 30111 Agent-Conf-ispell_mode = ~UDM_ISPELL_MODE_SERVER; #endif - if (UdmImportAffixes(Agent-Conf,val1,val2,NULL,0)) { php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot load affix file %s,val2); RETURN_FALSE; } -#else +#elif UDM_VERSION_ID 30225 if (UdmImportAffixes(Agent-Conf,val1,charset,val2)) { php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot load affix file %s,val2); RETURN_FALSE; } - +#else + if(UdmAffixListListAdd(Agent-Conf-Affixes,val1,charset,val2)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot load affix file %s,val2); + RETURN_FALSE; + } #endif break; case UDM_ISPELL_TYPE_SPELL: #if UDM_VERSION_ID 30200 Agent-Conf-ispell_mode = ~UDM_ISPELL_MODE_DB; - #if UDM_VERSION_ID 30111 Agent-Conf-ispell_mode = ~UDM_ISPELL_MODE_SERVER; #endif - if (UdmImportDictionary(Agent-Conf,val1,val2,1,)) { php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot load spell file %s,val2); RETURN_FALSE; } -#else +#elif UDM_VERSION_ID 30225 if (UdmImportDictionary(Agent-Conf,val1,charset,val2,0,)) { php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot load spell file %s,val2); RETURN_FALSE; } +#else + if(UdmSpellListListAdd(Agent-Conf-Spells,val1,charset,val2)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot load spell file %s,val2); + RETURN_FALSE; + } #endif break; @@ -1262,6 +1267,7 @@ } if (flag) { +#if UDM_VERSION_ID 30225 #if UDM_VERSION_ID = 30204 if(Agent-Conf-Spells.nspell) { UdmSortDictionary(Agent-Conf-Spells); @@ -1273,6 +1279,7 @@ UdmSortAffixes(Agent-Conf); } #endif +#endif } RETURN_TRUE; @@ -1297,8 +1304,11 @@ break; } ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, mnoGoSearch-Agent, le_link); - -#if UDM_VERSION_ID = 30204 + +#if UDM_VERSION_ID = 30225 + UdmSpellListListFree(Agent-Conf-Spells); + UdmAffixListListFree(Agent-Conf-Affixes); +#elif UDM_VERSION_ID = 30204 UdmSpellListFree(Agent-Conf-Spells); UdmAffixListFree(Agent-Conf-Affixes); #elif UDM_VERSION_ID 30111 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c php_mnogo.h
: | + | http://www.php.net/license/3_0.txt. | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immediately. | @@ -20,7 +20,7 @@ | and Ramil Kalimullin [EMAIL PROTECTED]| | Further development by Sergey Kartashoff [EMAIL PROTECTED] | +--+ - */ +*/ #ifndef _PHP_MNOGO_H #define _PHP_MNOGO_H @@ -57,11 +57,6 @@ DLEXPORT PHP_FUNCTION(udm_api_version); #if UDM_VERSION_ID = 30200 DLEXPORT PHP_FUNCTION(udm_check_charset); -#if UDM_VERSION_ID == 30203 -DLEXPORT PHP_FUNCTION(udm_open_stored); -DLEXPORT PHP_FUNCTION(udm_check_stored); -DLEXPORT PHP_FUNCTION(udm_close_stored); -#endif #if UDM_VERSION_ID = 30203 DLEXPORT PHP_FUNCTION(udm_crc32); #endif @@ -69,12 +64,16 @@ DLEXPORT PHP_FUNCTION(udm_parse_query_string); DLEXPORT PHP_FUNCTION(udm_make_excerpt); DLEXPORT PHP_FUNCTION(udm_set_agent_param_ex); +DLEXPORT PHP_FUNCTION(udm_get_agent_param_ex); DLEXPORT PHP_FUNCTION(udm_get_res_field_ex); #endif #if UDM_VERSION_ID = 30211 DLEXPORT PHP_FUNCTION(udm_hash32); DLEXPORT PHP_FUNCTION(udm_alloc_agent_array); #endif +#if UDM_VERSION_ID = 30216 +DLEXPORT PHP_FUNCTION(udm_store_doc_cgi); +#endif #endif DLEXPORT PHP_FUNCTION(udm_alloc_agent); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mnogosearch php_mnogo.c
gluke Sun Nov 28 15:04:00 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/mnogosearchphp_mnogo.c Log: - MnoGoSearch extension updated to fix compilation issues with mnogosearch-3.2.25+ http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.90.2.4r2=1.90.2.5ty=u Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.90.2.4 php-src/ext/mnogosearch/php_mnogo.c:1.90.2.5 --- php-src/ext/mnogosearch/php_mnogo.c:1.90.2.4Mon Nov 15 14:02:38 2004 +++ php-src/ext/mnogosearch/php_mnogo.c Sun Nov 28 15:03:59 2004 @@ -1,5 +1,5 @@ /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.90.2.4 2004/11/15 19:02:38 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.90.2.5 2004/11/28 20:03:59 gluke Exp $ */ /* +--+ @@ -1214,43 +1214,48 @@ #endif case UDM_ISPELL_TYPE_AFFIX: -#if UDM_VERSION_ID 30200 +#if UDM_VERSION_ID 30200 Agent-Conf-ispell_mode = ~UDM_ISPELL_MODE_DB; - #if UDM_VERSION_ID 30111 Agent-Conf-ispell_mode = ~UDM_ISPELL_MODE_SERVER; #endif - if (UdmImportAffixes(Agent-Conf,val1,val2,NULL,0)) { php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot load affix file %s,val2); RETURN_FALSE; } -#else +#elif UDM_VERSION_ID 30225 if (UdmImportAffixes(Agent-Conf,val1,charset,val2)) { php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot load affix file %s,val2); RETURN_FALSE; } - +#else + if(UdmAffixListListAdd(Agent-Conf-Affixes,val1,charset,val2)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot load affix file %s,val2); + RETURN_FALSE; + } #endif break; case UDM_ISPELL_TYPE_SPELL: #if UDM_VERSION_ID 30200 Agent-Conf-ispell_mode = ~UDM_ISPELL_MODE_DB; - #if UDM_VERSION_ID 30111 Agent-Conf-ispell_mode = ~UDM_ISPELL_MODE_SERVER; #endif - if (UdmImportDictionary(Agent-Conf,val1,val2,1,)) { php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot load spell file %s,val2); RETURN_FALSE; } -#else +#elif UDM_VERSION_ID 30225 if (UdmImportDictionary(Agent-Conf,val1,charset,val2,0,)) { php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot load spell file %s,val2); RETURN_FALSE; } +#else + if(UdmSpellListListAdd(Agent-Conf-Spells,val1,charset,val2)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot load spell file %s,val2); + RETURN_FALSE; + } #endif break; @@ -1262,6 +1267,7 @@ } if (flag) { +#if UDM_VERSION_ID 30225 #if UDM_VERSION_ID = 30204 if(Agent-Conf-Spells.nspell) { UdmSortDictionary(Agent-Conf-Spells); @@ -1273,6 +1279,7 @@ UdmSortAffixes(Agent-Conf); } #endif +#endif } RETURN_TRUE; @@ -1297,8 +1304,11 @@ break; } ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, mnoGoSearch-Agent, le_link); - -#if UDM_VERSION_ID = 30204 + +#if UDM_VERSION_ID = 30225 + UdmSpellListListFree(Agent-Conf-Spells); + UdmAffixListListFree(Agent-Conf-Affixes); +#elif UDM_VERSION_ID = 30204 UdmSpellListFree(Agent-Conf-Spells); UdmAffixListFree(Agent-Conf-Affixes); #elif UDM_VERSION_ID 30111 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c
gluke Sun Nov 28 15:30:09 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchphp_mnogo.c Log: - MnoGoSearch extension latest patch reverted http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.66.2.13r2=1.66.2.14ty=u Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.66.2.13 php-src/ext/mnogosearch/php_mnogo.c:1.66.2.14 --- php-src/ext/mnogosearch/php_mnogo.c:1.66.2.13 Sun Nov 28 15:03:28 2004 +++ php-src/ext/mnogosearch/php_mnogo.c Sun Nov 28 15:30:08 2004 @@ -1,5 +1,5 @@ /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.66.2.13 2004/11/28 20:03:28 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.66.2.14 2004/11/28 20:30:08 gluke Exp $ */ /* +--+ @@ -77,7 +77,7 @@ #define UDM_PARAM_HLBEG19 #define UDM_PARAM_HLEND20 #define UDM_PARAM_SYNONYM 21 -#define UDM_PARAM_SEARCHD 22 /* unused */ +#define UDM_PARAM_SEARCHD 22 #define UDM_PARAM_QSTRING 23 #define UDM_PARAM_REMOTE_ADDR 24 #define UDM_PARAM_QUERY25 @@ -156,6 +156,11 @@ #if UDM_VERSION_ID = 30200 PHP_FE(udm_check_charset, NULL) +#if UDM_VERSION_ID == 30203 + PHP_FE(udm_open_stored, NULL) + PHP_FE(udm_check_stored,NULL) + PHP_FE(udm_close_stored,NULL) +#endif #if UDM_VERSION_ID = 30203 PHP_FE(udm_crc32, NULL) #endif @@ -163,16 +168,12 @@ PHP_FE(udm_parse_query_string, NULL) PHP_FE(udm_make_excerpt,NULL) PHP_FE(udm_set_agent_param_ex, NULL) - PHP_FE(udm_get_agent_param_ex, NULL) PHP_FE(udm_get_res_field_ex,NULL) #endif #if UDM_VERSION_ID = 30211 PHP_FE(udm_hash32, NULL) PHP_FE(udm_alloc_agent_array, NULL) #endif -#if UDM_VERSION_ID = 30216 - PHP_FE(udm_store_doc_cgi, NULL) -#endif #endif PHP_FE(udm_alloc_agent, NULL) @@ -316,6 +317,7 @@ REGISTER_LONG_CONSTANT(UDM_PARAM_HLEND, UDM_PARAM_HLEND,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(UDM_PARAM_SYNONYM, UDM_PARAM_SYNONYM,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(UDM_PARAM_SEARCHD, UDM_PARAM_SEARCHD,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(UDM_PARAM_STORED, UDM_PARAM_STORED,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(UDM_PARAM_GROUPBYSITE, UDM_PARAM_GROUPBYSITE,CONST_CS | CONST_PERSISTENT); @@ -429,38 +431,21 @@ } static char* MyRemoveHiLightDup(const char *s){ - size_t len=strlen(s)+1; - char *d, *res = (char*)emalloc(len); - - for(d=res; s[0]; s++) - { -switch(s[0]) -{ - case '\2': - case '\3': -break; - case '': -if (s[1] == '#') -{ - char *e; - int code= 0; - - for (e= (char *)s+2; (*e = '0') (*e = '9'); code= code*10 + e[0]-'0', e++); - if (*e == ';') - { -*d++= (code 128) ? code : '?'; -s= e; -break; - } -} -/* pass through */ - - default: -*d++=*s; -} - } - *d='\0'; - return res; + size_t len=strlen(s)+1; + char*res=malloc(len); + char*d; + + for(d=res;s[0];s++){ + switch(s[0]){ + case '\2': + case '\3': + break; + default: + *d++=*s; + } + } + *d='\0'; + return res; } /* {{{ proto int udm_alloc_agent(string dbaddr [, string dbmode]) @@ -923,6 +908,18 @@ #endif break; + case UDM_PARAM_SEARCHD: +#if UDM_VERSION_ID = 30203 + UdmSDCLientListAdd((Agent-Conf-sdcl),val); + { + size_t i; + for(i=0;iAgent-Conf-sdcl.nclients;i++){ + UdmSDCLientListAdd(Agent-sdcl,Agent-Conf-sdcl.Clients[i].addr); + } + } +#endif + break; + case UDM_PARAM_QSTRING: #if UDM_VERSION_ID = 30204 UdmVarListReplaceStr(Agent-Conf-Vars,QUERY_STRING,val); @@ -1214,45 +1211,40 @@ #endif case UDM_ISPELL_TYPE_AFFIX: -#if UDM_VERSION_ID 30200 +#if UDM_VERSION_ID 30200 Agent-Conf-ispell_mode = ~UDM_ISPELL_MODE_DB; + #if UDM_VERSION_ID 30111 Agent-Conf-ispell_mode = ~UDM_ISPELL_MODE_SERVER; #endif +
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.h
gluke Sun Nov 28 15:31:37 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchphp_mnogo.h Log: - MnoGoSearch extension latest patch reverted (part2) http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.h?r1=1.19.4.4r2=1.19.4.5ty=u Index: php-src/ext/mnogosearch/php_mnogo.h diff -u php-src/ext/mnogosearch/php_mnogo.h:1.19.4.4 php-src/ext/mnogosearch/php_mnogo.h:1.19.4.5 --- php-src/ext/mnogosearch/php_mnogo.h:1.19.4.4Sun Nov 28 15:03:29 2004 +++ php-src/ext/mnogosearch/php_mnogo.h Sun Nov 28 15:31:36 2004 @@ -1,11 +1,11 @@ /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.h,v $ */ -/* $Id: php_mnogo.h,v 1.19.4.4 2004/11/28 20:03:29 gluke Exp $ */ +/* $Id: php_mnogo.h,v 1.19.4.5 2004/11/28 20:31:36 gluke Exp $ */ -/* +/* +--+ - | PHP Version 5| + | PHP Version 4| +--+ - | Copyright (c) 1997-2004 The PHP Group| + | Copyright (c) 1997-2003 The PHP Group| +--+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| @@ -15,12 +15,12 @@ | obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immediately. | +--+ - | Authors: | + | Authors: | | Initial version by Alex Barkov [EMAIL PROTECTED] | | and Ramil Kalimullin [EMAIL PROTECTED]| | Further development by Sergey Kartashoff [EMAIL PROTECTED] | +--+ -*/ + */ #ifndef _PHP_MNOGO_H #define _PHP_MNOGO_H -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.h
gluke Sun Nov 28 15:33:09 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchphp_mnogo.h Log: # - MnoGoSearch extension latest patch reverted (part3) http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.h?r1=1.19.4.5r2=1.19.4.6ty=u Index: php-src/ext/mnogosearch/php_mnogo.h diff -u php-src/ext/mnogosearch/php_mnogo.h:1.19.4.5 php-src/ext/mnogosearch/php_mnogo.h:1.19.4.6 --- php-src/ext/mnogosearch/php_mnogo.h:1.19.4.5Sun Nov 28 15:31:36 2004 +++ php-src/ext/mnogosearch/php_mnogo.h Sun Nov 28 15:33:09 2004 @@ -1,21 +1,21 @@ /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.h,v $ */ -/* $Id: php_mnogo.h,v 1.19.4.5 2004/11/28 20:31:36 gluke Exp $ */ +/* $Id: php_mnogo.h,v 1.19.4.6 2004/11/28 20:33:09 gluke Exp $ */ -/* +/* +--+ | PHP Version 4| +--+ | Copyright (c) 1997-2003 The PHP Group| +--+ - | This source file is subject to version 3.0 of the PHP license, | + | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | + | available at through the world-wide-web at | + | http://www.php.net/license/2_02.txt. | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immediately. | +--+ - | Authors: | + | Authors: | | Initial version by Alex Barkov [EMAIL PROTECTED] | | and Ramil Kalimullin [EMAIL PROTECTED]| | Further development by Sergey Kartashoff [EMAIL PROTECTED] | @@ -57,6 +57,11 @@ DLEXPORT PHP_FUNCTION(udm_api_version); #if UDM_VERSION_ID = 30200 DLEXPORT PHP_FUNCTION(udm_check_charset); +#if UDM_VERSION_ID == 30203 +DLEXPORT PHP_FUNCTION(udm_open_stored); +DLEXPORT PHP_FUNCTION(udm_check_stored); +DLEXPORT PHP_FUNCTION(udm_close_stored); +#endif #if UDM_VERSION_ID = 30203 DLEXPORT PHP_FUNCTION(udm_crc32); #endif @@ -64,16 +69,12 @@ DLEXPORT PHP_FUNCTION(udm_parse_query_string); DLEXPORT PHP_FUNCTION(udm_make_excerpt); DLEXPORT PHP_FUNCTION(udm_set_agent_param_ex); -DLEXPORT PHP_FUNCTION(udm_get_agent_param_ex); DLEXPORT PHP_FUNCTION(udm_get_res_field_ex); #endif #if UDM_VERSION_ID = 30211 DLEXPORT PHP_FUNCTION(udm_hash32); DLEXPORT PHP_FUNCTION(udm_alloc_agent_array); #endif -#if UDM_VERSION_ID = 30216 -DLEXPORT PHP_FUNCTION(udm_store_doc_cgi); -#endif #endif DLEXPORT PHP_FUNCTION(udm_alloc_agent); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c php_mnogo.h
gluke Mon Nov 15 14:03:19 2004 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c php_mnogo.h Log: # Copyright header version info changed to PHP 5 standard notice http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.93r2=1.94ty=u Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.93 php-src/ext/mnogosearch/php_mnogo.c:1.94 --- php-src/ext/mnogosearch/php_mnogo.c:1.93Sun Nov 14 14:29:58 2004 +++ php-src/ext/mnogosearch/php_mnogo.c Mon Nov 15 14:03:19 2004 @@ -1,11 +1,11 @@ /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.93 2004/11/14 19:29:58 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.94 2004/11/15 19:03:19 gluke Exp $ */ /* +--+ - | PHP Version 4| + | PHP Version 5| +--+ - | Copyright (c) 1997-2003 The PHP Group| + | Copyright (c) 1997-2004 The PHP Group| +--+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| @@ -20,7 +20,7 @@ | and Ramil Kalimullin [EMAIL PROTECTED]| | Further development by Sergey Kartashoff [EMAIL PROTECTED] | +--+ - */ +*/ #ifdef HAVE_CONFIG_H #include config.h http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.h?r1=1.25r2=1.26ty=u Index: php-src/ext/mnogosearch/php_mnogo.h diff -u php-src/ext/mnogosearch/php_mnogo.h:1.25 php-src/ext/mnogosearch/php_mnogo.h:1.26 --- php-src/ext/mnogosearch/php_mnogo.h:1.25Sat May 8 07:50:36 2004 +++ php-src/ext/mnogosearch/php_mnogo.h Mon Nov 15 14:03:19 2004 @@ -1,113 +1,113 @@ -/* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.h,v $ */ -/* $Id: php_mnogo.h,v 1.25 2004/05/08 11:50:36 gluke Exp $ */ - -/* - +--+ - | PHP Version 4| - +--+ - | Copyright (c) 1997-2003 The PHP Group| - +--+ - | This source file is subject to version 2.02 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is| - | available at through the world-wide-web at | - | http://www.php.net/license/2_02.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | [EMAIL PROTECTED] so we can mail you a copy immediately. | - +--+ - | Authors: | - | Initial version by Alex Barkov [EMAIL PROTECTED] | - | and Ramil Kalimullin [EMAIL PROTECTED]| - | Further development by Sergey Kartashoff [EMAIL PROTECTED] | - +--+ - */ - -#ifndef _PHP_MNOGO_H -#define _PHP_MNOGO_H - -#if HAVE_MNOGOSEARCH - -#include udm_config.h -#include udmsearch.h - -#if UDM_VERSION_ID = 30203 -#include udm_crc32.h -#include udm_store.h -#endif - -extern zend_module_entry mnogosearch_module_entry; -#define mnogosearch_module_ptr mnogosearch_module_entry - -#ifdef PHP_WIN32 -#define PHP_MNOGO_API __declspec(dllexport) -#else -#define PHP_MNOGO_API -#endif - -#ifdef ZTS -#include TSRM.h -#endif - -/* mnoGoSearch functions */ -DLEXPORT PHP_MINIT_FUNCTION(mnogosearch); -DLEXPORT PHP_RINIT_FUNCTION(mnogosearch); -DLEXPORT PHP_MSHUTDOWN_FUNCTION(mnogosearch); -DLEXPORT PHP_MINFO_FUNCTION(mnogosearch); - -DLEXPORT PHP_FUNCTION(udm_api_version); -#if UDM_VERSION_ID = 30200 -DLEXPORT PHP_FUNCTION(udm_check_charset); -#if UDM_VERSION_ID = 30203 -DLEXPORT PHP_FUNCTION(udm_crc32); -#endif -#if UDM_VERSION_ID = 30204 -DLEXPORT PHP_FUNCTION(udm_parse_query_string); -DLEXPORT PHP_FUNCTION(udm_make_excerpt); -DLEXPORT PHP_FUNCTION(udm_set_agent_param_ex); -DLEXPORT PHP_FUNCTION(udm_get_agent_param_ex); -DLEXPORT PHP_FUNCTION(udm_get_res_field_ex); -#endif
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mnogosearch php_mnogo.h
gluke Mon Nov 15 14:07:35 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/mnogosearchphp_mnogo.h Log: # Unix EOLs fixed http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.h?r1=1.25.2.1r2=1.25.2.2ty=u Index: php-src/ext/mnogosearch/php_mnogo.h diff -u php-src/ext/mnogosearch/php_mnogo.h:1.25.2.1 php-src/ext/mnogosearch/php_mnogo.h:1.25.2.2 --- php-src/ext/mnogosearch/php_mnogo.h:1.25.2.1Mon Nov 15 14:02:38 2004 +++ php-src/ext/mnogosearch/php_mnogo.h Mon Nov 15 14:07:34 2004 @@ -1,113 +1,113 @@ -/* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.h,v $ */ -/* $Id: php_mnogo.h,v 1.25.2.1 2004/11/15 19:02:38 gluke Exp $ */ - -/* - +--+ - | PHP Version 5| - +--+ - | Copyright (c) 1997-2004 The PHP Group| - +--+ - | This source file is subject to version 3.0 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is| - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | [EMAIL PROTECTED] so we can mail you a copy immediately. | - +--+ - | Authors: | - | Initial version by Alex Barkov [EMAIL PROTECTED] | - | and Ramil Kalimullin [EMAIL PROTECTED]| - | Further development by Sergey Kartashoff [EMAIL PROTECTED] | - +--+ -*/ - -#ifndef _PHP_MNOGO_H -#define _PHP_MNOGO_H - -#if HAVE_MNOGOSEARCH - -#include udm_config.h -#include udmsearch.h - -#if UDM_VERSION_ID = 30203 -#include udm_crc32.h -#include udm_store.h -#endif - -extern zend_module_entry mnogosearch_module_entry; -#define mnogosearch_module_ptr mnogosearch_module_entry - -#ifdef PHP_WIN32 -#define PHP_MNOGO_API __declspec(dllexport) -#else -#define PHP_MNOGO_API -#endif - -#ifdef ZTS -#include TSRM.h -#endif - -/* mnoGoSearch functions */ -DLEXPORT PHP_MINIT_FUNCTION(mnogosearch); -DLEXPORT PHP_RINIT_FUNCTION(mnogosearch); -DLEXPORT PHP_MSHUTDOWN_FUNCTION(mnogosearch); -DLEXPORT PHP_MINFO_FUNCTION(mnogosearch); - -DLEXPORT PHP_FUNCTION(udm_api_version); -#if UDM_VERSION_ID = 30200 -DLEXPORT PHP_FUNCTION(udm_check_charset); -#if UDM_VERSION_ID = 30203 -DLEXPORT PHP_FUNCTION(udm_crc32); -#endif -#if UDM_VERSION_ID = 30204 -DLEXPORT PHP_FUNCTION(udm_parse_query_string); -DLEXPORT PHP_FUNCTION(udm_make_excerpt); -DLEXPORT PHP_FUNCTION(udm_set_agent_param_ex); -DLEXPORT PHP_FUNCTION(udm_get_agent_param_ex); -DLEXPORT PHP_FUNCTION(udm_get_res_field_ex); -#endif -#if UDM_VERSION_ID = 30211 -DLEXPORT PHP_FUNCTION(udm_hash32); -DLEXPORT PHP_FUNCTION(udm_alloc_agent_array); -#endif -#if UDM_VERSION_ID = 30216 -DLEXPORT PHP_FUNCTION(udm_store_doc_cgi); -#endif -#endif - -DLEXPORT PHP_FUNCTION(udm_alloc_agent); -DLEXPORT PHP_FUNCTION(udm_set_agent_param); - -DLEXPORT PHP_FUNCTION(udm_load_ispell_data); -DLEXPORT PHP_FUNCTION(udm_free_ispell_data); - -DLEXPORT PHP_FUNCTION(udm_add_search_limit); -DLEXPORT PHP_FUNCTION(udm_clear_search_limits); - -DLEXPORT PHP_FUNCTION(udm_error); -DLEXPORT PHP_FUNCTION(udm_errno); - -DLEXPORT PHP_FUNCTION(udm_find); -DLEXPORT PHP_FUNCTION(udm_get_res_field); -DLEXPORT PHP_FUNCTION(udm_get_res_param); - -DLEXPORT PHP_FUNCTION(udm_cat_list); -DLEXPORT PHP_FUNCTION(udm_cat_path); - -DLEXPORT PHP_FUNCTION(udm_free_res); -DLEXPORT PHP_FUNCTION(udm_free_agent); - -#if UDM_VERSION_ID 30110 -DLEXPORT PHP_FUNCTION(udm_get_doc_count); -#endif - -#else - -#define mnogosearch_module_ptr NULL - -#endif - -#define phpext_mnogosearch_ptr mnogosearch_module_ptr - -#endif /* _PHP_MNOGO_H */ +/* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.h,v $ */ +/* $Id: php_mnogo.h,v 1.25.2.2 2004/11/15 19:07:34 gluke Exp $ */ + +/* + +--+ + | PHP Version 5| + +--+ + | Copyright (c) 1997-2004 The PHP Group
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.h
gluke Mon Nov 15 14:08:20 2004 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.h Log: # Unix EOLs fixed http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.h?r1=1.26r2=1.27ty=u Index: php-src/ext/mnogosearch/php_mnogo.h diff -u php-src/ext/mnogosearch/php_mnogo.h:1.26 php-src/ext/mnogosearch/php_mnogo.h:1.27 --- php-src/ext/mnogosearch/php_mnogo.h:1.26Mon Nov 15 14:03:19 2004 +++ php-src/ext/mnogosearch/php_mnogo.h Mon Nov 15 14:08:18 2004 @@ -1,113 +1,113 @@ -/* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.h,v $ */ -/* $Id: php_mnogo.h,v 1.26 2004/11/15 19:03:19 gluke Exp $ */ - -/* - +--+ - | PHP Version 5| - +--+ - | Copyright (c) 1997-2004 The PHP Group| - +--+ - | This source file is subject to version 3.0 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is| - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | [EMAIL PROTECTED] so we can mail you a copy immediately. | - +--+ - | Authors: | - | Initial version by Alex Barkov [EMAIL PROTECTED] | - | and Ramil Kalimullin [EMAIL PROTECTED]| - | Further development by Sergey Kartashoff [EMAIL PROTECTED] | - +--+ -*/ - -#ifndef _PHP_MNOGO_H -#define _PHP_MNOGO_H - -#if HAVE_MNOGOSEARCH - -#include udm_config.h -#include udmsearch.h - -#if UDM_VERSION_ID = 30203 -#include udm_crc32.h -#include udm_store.h -#endif - -extern zend_module_entry mnogosearch_module_entry; -#define mnogosearch_module_ptr mnogosearch_module_entry - -#ifdef PHP_WIN32 -#define PHP_MNOGO_API __declspec(dllexport) -#else -#define PHP_MNOGO_API -#endif - -#ifdef ZTS -#include TSRM.h -#endif - -/* mnoGoSearch functions */ -DLEXPORT PHP_MINIT_FUNCTION(mnogosearch); -DLEXPORT PHP_RINIT_FUNCTION(mnogosearch); -DLEXPORT PHP_MSHUTDOWN_FUNCTION(mnogosearch); -DLEXPORT PHP_MINFO_FUNCTION(mnogosearch); - -DLEXPORT PHP_FUNCTION(udm_api_version); -#if UDM_VERSION_ID = 30200 -DLEXPORT PHP_FUNCTION(udm_check_charset); -#if UDM_VERSION_ID = 30203 -DLEXPORT PHP_FUNCTION(udm_crc32); -#endif -#if UDM_VERSION_ID = 30204 -DLEXPORT PHP_FUNCTION(udm_parse_query_string); -DLEXPORT PHP_FUNCTION(udm_make_excerpt); -DLEXPORT PHP_FUNCTION(udm_set_agent_param_ex); -DLEXPORT PHP_FUNCTION(udm_get_agent_param_ex); -DLEXPORT PHP_FUNCTION(udm_get_res_field_ex); -#endif -#if UDM_VERSION_ID = 30211 -DLEXPORT PHP_FUNCTION(udm_hash32); -DLEXPORT PHP_FUNCTION(udm_alloc_agent_array); -#endif -#if UDM_VERSION_ID = 30216 -DLEXPORT PHP_FUNCTION(udm_store_doc_cgi); -#endif -#endif - -DLEXPORT PHP_FUNCTION(udm_alloc_agent); -DLEXPORT PHP_FUNCTION(udm_set_agent_param); - -DLEXPORT PHP_FUNCTION(udm_load_ispell_data); -DLEXPORT PHP_FUNCTION(udm_free_ispell_data); - -DLEXPORT PHP_FUNCTION(udm_add_search_limit); -DLEXPORT PHP_FUNCTION(udm_clear_search_limits); - -DLEXPORT PHP_FUNCTION(udm_error); -DLEXPORT PHP_FUNCTION(udm_errno); - -DLEXPORT PHP_FUNCTION(udm_find); -DLEXPORT PHP_FUNCTION(udm_get_res_field); -DLEXPORT PHP_FUNCTION(udm_get_res_param); - -DLEXPORT PHP_FUNCTION(udm_cat_list); -DLEXPORT PHP_FUNCTION(udm_cat_path); - -DLEXPORT PHP_FUNCTION(udm_free_res); -DLEXPORT PHP_FUNCTION(udm_free_agent); - -#if UDM_VERSION_ID 30110 -DLEXPORT PHP_FUNCTION(udm_get_doc_count); -#endif - -#else - -#define mnogosearch_module_ptr NULL - -#endif - -#define phpext_mnogosearch_ptr mnogosearch_module_ptr - -#endif /* _PHP_MNOGO_H */ +/* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.h,v $ */ +/* $Id: php_mnogo.h,v 1.27 2004/11/15 19:08:18 gluke Exp $ */ + +/* + +--+ + | PHP Version 5| + +--+ + | Copyright (c) 1997-2004 The PHP Group| + +--+ + | This source file is subject to version 3.0
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mnogosearch config.m4
gluke Sun Aug 29 06:59:12 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/mnogosearchconfig.m4 Log: - A fix for building of shared mnogosearch module http://cvs.php.net/diff.php/php-src/ext/mnogosearch/config.m4?r1=1.11r2=1.11.2.1ty=u Index: php-src/ext/mnogosearch/config.m4 diff -u php-src/ext/mnogosearch/config.m4:1.11 php-src/ext/mnogosearch/config.m4:1.11.2.1 --- php-src/ext/mnogosearch/config.m4:1.11 Fri Oct 3 01:24:24 2003 +++ php-src/ext/mnogosearch/config.m4 Sun Aug 29 06:59:12 2004 @@ -1,6 +1,6 @@ dnl dnl $Source: /usr/repository/php-src/ext/mnogosearch/config.m4,v $ -dnl $Id: config.m4,v 1.11 2003/10/03 05:24:24 sniper Exp $ +dnl $Id: config.m4,v 1.11.2.1 2004/08/29 10:59:12 gluke Exp $ dnl PHP_ARG_WITH(mnogosearch,for mnoGoSearch support, @@ -47,7 +47,7 @@ AC_DEFINE(HAVE_MNOGOSEARCH,1,[ ]) -PHP_SUBST(MNOGOSEARCH_SHARED_LIBADD) PHP_NEW_EXTENSION(mnogosearch, php_mnogo.c, $ext_shared) +PHP_SUBST(MNOGOSEARCH_SHARED_LIBADD) fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mnogosearch config.m4
gluke Sun Aug 29 06:59:33 2004 EDT Modified files: /php-src/ext/mnogosearchconfig.m4 Log: - A fix for building of shared mnogosearch module http://cvs.php.net/diff.php/php-src/ext/mnogosearch/config.m4?r1=1.11r2=1.12ty=u Index: php-src/ext/mnogosearch/config.m4 diff -u php-src/ext/mnogosearch/config.m4:1.11 php-src/ext/mnogosearch/config.m4:1.12 --- php-src/ext/mnogosearch/config.m4:1.11 Fri Oct 3 01:24:24 2003 +++ php-src/ext/mnogosearch/config.m4 Sun Aug 29 06:59:32 2004 @@ -1,6 +1,6 @@ dnl dnl $Source: /usr/repository/php-src/ext/mnogosearch/config.m4,v $ -dnl $Id: config.m4,v 1.11 2003/10/03 05:24:24 sniper Exp $ +dnl $Id: config.m4,v 1.12 2004/08/29 10:59:32 gluke Exp $ dnl PHP_ARG_WITH(mnogosearch,for mnoGoSearch support, @@ -47,7 +47,7 @@ AC_DEFINE(HAVE_MNOGOSEARCH,1,[ ]) -PHP_SUBST(MNOGOSEARCH_SHARED_LIBADD) PHP_NEW_EXTENSION(mnogosearch, php_mnogo.c, $ext_shared) +PHP_SUBST(MNOGOSEARCH_SHARED_LIBADD) fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch config.m4
gluke Sun Aug 29 10:18:12 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchconfig.m4 Log: - A fix for building of shared mnogosearch module http://cvs.php.net/diff.php/php-src/ext/mnogosearch/config.m4?r1=1.10.4.1r2=1.10.4.2ty=u Index: php-src/ext/mnogosearch/config.m4 diff -u php-src/ext/mnogosearch/config.m4:1.10.4.1 php-src/ext/mnogosearch/config.m4:1.10.4.2 --- php-src/ext/mnogosearch/config.m4:1.10.4.1 Fri Oct 3 01:25:38 2003 +++ php-src/ext/mnogosearch/config.m4 Sun Aug 29 10:18:11 2004 @@ -1,6 +1,6 @@ dnl dnl $Source: /usr/repository/php-src/ext/mnogosearch/config.m4,v $ -dnl $Id: config.m4,v 1.10.4.1 2003/10/03 05:25:38 sniper Exp $ +dnl $Id: config.m4,v 1.10.4.2 2004/08/29 14:18:11 gluke Exp $ dnl PHP_ARG_WITH(mnogosearch,for mnoGoSearch support, @@ -47,7 +47,7 @@ AC_DEFINE(HAVE_MNOGOSEARCH,1,[ ]) -PHP_SUBST(MNOGOSEARCH_SHARED_LIBADD) PHP_NEW_EXTENSION(mnogosearch, php_mnogo.c, $ext_shared) +PHP_SUBST(MNOGOSEARCH_SHARED_LIBADD) fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mnogosearch php_mnogo.c
gluke Mon Jul 19 15:46:49 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/mnogosearchphp_mnogo.c Log: - A Bug #29147 was fixed. Thanks to Antony Dovgal tony2001 at phpclub.net for his patch. http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.90r2=1.90.2.1ty=u Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.90 php-src/ext/mnogosearch/php_mnogo.c:1.90.2.1 --- php-src/ext/mnogosearch/php_mnogo.c:1.90Thu Jul 8 01:22:10 2004 +++ php-src/ext/mnogosearch/php_mnogo.c Mon Jul 19 15:46:48 2004 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.90 2004/07/08 05:22:10 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.90.2.1 2004/07/19 19:46:48 gluke Exp $ */ /* +--+ @@ -430,7 +430,7 @@ static char* MyRemoveHiLightDup(const char *s){ size_t len=strlen(s)+1; - char *d, *res = (char*)UdmMalloc(len); + char *d, *res = (char*)emalloc(len); for(d=res; s[0]; s++) { @@ -1625,7 +1625,7 @@ al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), URL, ))); UdmVarListReplaceInt((Res-Doc[row].Sections), STORED_ID, UdmCRC32(al, strlen(al))); - free(al); + efree(al); #if UDM_VERSION_ID = 30216 Excerpt = UdmExcerptDoc(Agent, Res, (Res-Doc[row]), ExcerptSize, ExcerptPadding); @@ -1777,7 +1777,7 @@ char*al; al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), field, ))); UdmVarListReplaceStr(Res-Doc[row].Sections,field,al); - free(al); + efree(al); } RETURN_STRING((char *)UdmVarListFindStr(Res-Doc[row].Sections,field,),1); } else { @@ -1839,12 +1839,11 @@ if(!Doc-Buf.content) { UdmResultFree(Res); UdmDocFree(Doc); - UDM_FREE(HDoc); RETURN_FALSE; } - HEnd=HDoc = (char*)UdmMalloc(UDM_MAXDOCSIZE + 32); + HEnd=HDoc = (char*)emalloc(UDM_MAXDOCSIZE + 32); *HEnd='\0'; if (strncasecmp(content_type, text/plain, 10) == 0) { @@ -1885,7 +1884,7 @@ UdmResultFree(Res); UdmDocFree(Doc); - UDM_FREE(HDoc); + efree(HDoc); RETURN_TRUE; } @@ -2066,7 +2065,7 @@ char*al; al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), URL, ))); UdmVarListReplaceStr(Res-Doc[row].Sections,URL,al); - free(al); + efree(al); RETURN_STRING((char *)UdmVarListFindStr((Res-Doc[row].Sections),URL,),1); } @@ -2256,7 +2255,7 @@ len += Res-WWList.Word[i].len + 64; { size_t wsize=(1+len)*sizeof(char); - char *wordinfo = (char*) malloc(wsize); + char *wordinfo = (char*) emalloc(wsize); *wordinfo = '\0'; @@ -2270,7 +2269,7 @@ sprintf(UDM_STREND(wordinfo), %s : stopword, Res-WWList.Word[i].word); } } - RETURN_STRING(wordinfo,1); + RETURN_STRING(wordinfo,0); } } #else @@ -2286,7 +2285,7 @@ len += Res-WWList.Word[i].len + 64; { size_t wsize=(1+len)*sizeof(char); - char *wordinfo = (char*) malloc(wsize); + char *wordinfo = (char*) emalloc(wsize); int corder = (size_t)-1, ccount = 0; *wordinfo = '\0'; @@ -2305,7 +2304,7 @@ sprintf(UDM_STREND(wordinfo),%s%s : %d / %d, (*wordinfo) ? , : , Res-WWList.Word[i].word, Res-WWList.Word[i].count, ccount); } else continue; } - RETURN_STRING(wordinfo,1); + RETURN_STRING(wordinfo,0); } } break; @@ -2489,7 +2488,7 @@ #endif array_init(return_value); - if
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Sun Jul 18 07:18:04 2004 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - A Bug #29147 was fixed. Thanks to Antony Dovgal tony2001 at phpclub.net for his patch. http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.90r2=1.91ty=u Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.90 php-src/ext/mnogosearch/php_mnogo.c:1.91 --- php-src/ext/mnogosearch/php_mnogo.c:1.90Thu Jul 8 01:22:10 2004 +++ php-src/ext/mnogosearch/php_mnogo.c Sun Jul 18 07:18:03 2004 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.90 2004/07/08 05:22:10 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.91 2004/07/18 11:18:03 gluke Exp $ */ /* +--+ @@ -430,7 +430,7 @@ static char* MyRemoveHiLightDup(const char *s){ size_t len=strlen(s)+1; - char *d, *res = (char*)UdmMalloc(len); + char *d, *res = (char*)emalloc(len); for(d=res; s[0]; s++) { @@ -1625,7 +1625,7 @@ al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), URL, ))); UdmVarListReplaceInt((Res-Doc[row].Sections), STORED_ID, UdmCRC32(al, strlen(al))); - free(al); + efree(al); #if UDM_VERSION_ID = 30216 Excerpt = UdmExcerptDoc(Agent, Res, (Res-Doc[row]), ExcerptSize, ExcerptPadding); @@ -1777,7 +1777,7 @@ char*al; al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), field, ))); UdmVarListReplaceStr(Res-Doc[row].Sections,field,al); - free(al); + efree(al); } RETURN_STRING((char *)UdmVarListFindStr(Res-Doc[row].Sections,field,),1); } else { @@ -1839,12 +1839,11 @@ if(!Doc-Buf.content) { UdmResultFree(Res); UdmDocFree(Doc); - UDM_FREE(HDoc); RETURN_FALSE; } - HEnd=HDoc = (char*)UdmMalloc(UDM_MAXDOCSIZE + 32); + HEnd=HDoc = (char*)emalloc(UDM_MAXDOCSIZE + 32); *HEnd='\0'; if (strncasecmp(content_type, text/plain, 10) == 0) { @@ -1885,7 +1884,7 @@ UdmResultFree(Res); UdmDocFree(Doc); - UDM_FREE(HDoc); + efree(HDoc); RETURN_TRUE; } @@ -2066,7 +2065,7 @@ char*al; al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), URL, ))); UdmVarListReplaceStr(Res-Doc[row].Sections,URL,al); - free(al); + efree(al); RETURN_STRING((char *)UdmVarListFindStr((Res-Doc[row].Sections),URL,),1); } @@ -2256,7 +2255,7 @@ len += Res-WWList.Word[i].len + 64; { size_t wsize=(1+len)*sizeof(char); - char *wordinfo = (char*) malloc(wsize); + char *wordinfo = (char*) emalloc(wsize); *wordinfo = '\0'; @@ -2270,7 +2269,7 @@ sprintf(UDM_STREND(wordinfo), %s : stopword, Res-WWList.Word[i].word); } } - RETURN_STRING(wordinfo,1); + RETURN_STRING(wordinfo,0); } } #else @@ -2286,7 +2285,7 @@ len += Res-WWList.Word[i].len + 64; { size_t wsize=(1+len)*sizeof(char); - char *wordinfo = (char*) malloc(wsize); + char *wordinfo = (char*) emalloc(wsize); int corder = (size_t)-1, ccount = 0; *wordinfo = '\0'; @@ -2305,7 +2304,7 @@ sprintf(UDM_STREND(wordinfo),%s%s : %d / %d, (*wordinfo) ? , : , Res-WWList.Word[i].word, Res-WWList.Word[i].count, ccount); } else continue; } - RETURN_STRING(wordinfo,1); + RETURN_STRING(wordinfo,0); } } break; @@ -2489,7 +2488,7 @@ #endif array_init(return_value); - if (!(buf=calloc(1,UDMSTRSIZ+1))) { + if
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Tue Jul 6 15:08:44 2004 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - Some fixes in mnogosearch extension http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.88r2=1.89ty=u Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.88 php-src/ext/mnogosearch/php_mnogo.c:1.89 --- php-src/ext/mnogosearch/php_mnogo.c:1.88Sat May 8 07:50:36 2004 +++ php-src/ext/mnogosearch/php_mnogo.c Tue Jul 6 15:08:44 2004 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.88 2004/05/08 11:50:36 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.89 2004/07/06 19:08:44 gluke Exp $ */ /* +--+ @@ -429,21 +429,38 @@ } static char* MyRemoveHiLightDup(const char *s){ - size_t len=strlen(s)+1; - char*res=malloc(len); - char*d; - - for(d=res;s[0];s++){ - switch(s[0]){ - case '\2': - case '\3': - break; - default: - *d++=*s; - } - } - *d='\0'; - return res; + size_t len=strlen(s)+1; + char *d, *res = (char*)UdmMalloc(len); + + for(d=res; s[0]; s++) + { +switch(s[0]) +{ + case '\2': + case '\3': +break; + case '': +if (s[1] == '#') +{ + char *e; + int code= 0; + + for (e= (char *)s+2; (*e = '0') (*e = '9'); code= code*10 + e[0]-'0', e++); + if (*e == ';') + { +*d++= (code 128) ? code : '?'; +s= e; +break; + } +} +/* pass through */ + + default: +*d++=*s; +} + } + *d='\0'; + return res; } /* {{{ proto int udm_alloc_agent(string dbaddr [, string dbmode]) @@ -1612,15 +1629,18 @@ #if UDM_VERSION_ID = 30216 Excerpt = UdmExcerptDoc(Agent, Res, (Res-Doc[row]), ExcerptSize, ExcerptPadding); + if (Excerpt) { + UdmVarListReplaceStr((Res-Doc[row].Sections),Body,Excerpt); + UDM_FREE(Excerpt); + } #else Excerpt = UdmExcerptDoc(Agent, Res, (Res-Doc[row]), 256); -#endif - if ((Excerpt != NULL) (strlen(Excerpt) 6)) { char *HlExcerpt = UdmHlConvert(Res-WWList, Excerpt, Agent-Conf-lcs, Agent-Conf-bcs); UdmVarListReplaceStr((Res-Doc[row].Sections),Body,HlExcerpt); UDM_FREE(HlExcerpt); } +#endif if (Excerpt != NULL (UdmVarListFindStr((Res-Doc[row].Sections), Z, NULL) == NULL)) { UdmVarListReplaceInt((Res-Doc[row].Sections),ST,1); UDM_FREE(Excerpt); @@ -2065,7 +2085,14 @@ case UDM_FIELD_TITLE: #if UDM_VERSION_ID = 30204 - RETURN_STRING((char *)UdmVarListFindStr((Res-Doc[row].Sections),Title,),1); + { + char*al; + al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), Title, ))); + UdmVarListReplaceStr(Res-Doc[row].Sections,Title,al); + free(al); + + RETURN_STRING((char *)UdmVarListFindStr(Res-Doc[row].Sections,Title,),1); + } #else RETURN_STRING((Res-Doc[row].title)?(Res-Doc[row].title):,1); #endif @@ -2073,7 +2100,14 @@ case UDM_FIELD_KEYWORDS: #if UDM_VERSION_ID = 30204 - RETURN_STRING((char *)UdmVarListFindStr((Res-Doc[row].Sections),Meta.Keywords,),1); + { + char*al; + al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), Meta.Keywords, ))); + UdmVarListReplaceStr(Res-Doc[row].Sections,Meta.Keywords,al); + free(al); + + RETURN_STRING((char *)UdmVarListFindStr(Res-Doc[row].Sections,Meta.Keywords,),1); + } #else RETURN_STRING((Res-Doc[row].keywords)?(Res-Doc[row].keywords):,1); #endif @@ -2081,7 +2115,14 @@ case UDM_FIELD_DESC: #if UDM_VERSION_ID = 30204 - RETURN_STRING((char
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c php_mnogo.h
gluke Sat May 8 07:50:37 2004 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c php_mnogo.h Log: - mnoGoSearch extension was updated to support CachedCopies of mnogosearch-3.2.16 or later. Udm_Get_Agent_Param and Udm_Store_Doc_Cgi functions were added. MnoGoSearch-3.2.3 stored API was removed. http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.87r2=1.88ty=u Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.87 php-src/ext/mnogosearch/php_mnogo.c:1.88 --- php-src/ext/mnogosearch/php_mnogo.c:1.87Mon Feb 16 11:11:55 2004 +++ php-src/ext/mnogosearch/php_mnogo.c Sat May 8 07:50:36 2004 @@ -1,11 +1,11 @@ /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.87 2004/02/16 16:11:55 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.88 2004/05/08 11:50:36 gluke Exp $ */ /* +--+ - | PHP Version 5| + | PHP Version 4| +--+ - | Copyright (c) 1997-2004 The PHP Group| + | Copyright (c) 1997-2003 The PHP Group| +--+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| @@ -77,7 +77,7 @@ #define UDM_PARAM_HLBEG19 #define UDM_PARAM_HLEND20 #define UDM_PARAM_SYNONYM 21 -#define UDM_PARAM_SEARCHD 22 +#define UDM_PARAM_SEARCHD 22 /* unused */ #define UDM_PARAM_QSTRING 23 #define UDM_PARAM_REMOTE_ADDR 24 #define UDM_PARAM_QUERY25 @@ -156,11 +156,6 @@ #if UDM_VERSION_ID = 30200 PHP_FE(udm_check_charset, NULL) -#if UDM_VERSION_ID == 30203 - PHP_FE(udm_open_stored, NULL) - PHP_FE(udm_check_stored,NULL) - PHP_FE(udm_close_stored,NULL) -#endif #if UDM_VERSION_ID = 30203 PHP_FE(udm_crc32, NULL) #endif @@ -168,12 +163,16 @@ PHP_FE(udm_parse_query_string, NULL) PHP_FE(udm_make_excerpt,NULL) PHP_FE(udm_set_agent_param_ex, NULL) + PHP_FE(udm_get_agent_param_ex, NULL) PHP_FE(udm_get_res_field_ex,NULL) #endif #if UDM_VERSION_ID = 30211 PHP_FE(udm_hash32, NULL) PHP_FE(udm_alloc_agent_array, NULL) #endif +#if UDM_VERSION_ID = 30216 + PHP_FE(udm_store_doc_cgi, NULL) +#endif #endif PHP_FE(udm_alloc_agent, NULL) @@ -317,7 +316,6 @@ REGISTER_LONG_CONSTANT(UDM_PARAM_HLEND, UDM_PARAM_HLEND,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(UDM_PARAM_SYNONYM, UDM_PARAM_SYNONYM,CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(UDM_PARAM_SEARCHD, UDM_PARAM_SEARCHD,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(UDM_PARAM_STORED, UDM_PARAM_STORED,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(UDM_PARAM_GROUPBYSITE, UDM_PARAM_GROUPBYSITE,CONST_CS | CONST_PERSISTENT); @@ -908,18 +906,6 @@ #endif break; - case UDM_PARAM_SEARCHD: -#if UDM_VERSION_ID = 30203 - UdmSDCLientListAdd((Agent-Conf-sdcl),val); - { - size_t i; - for(i=0;iAgent-Conf-sdcl.nclients;i++){ - UdmSDCLientListAdd(Agent-sdcl,Agent-Conf-sdcl.Clients[i].addr); - } - } -#endif - break; - case UDM_PARAM_QSTRING: #if UDM_VERSION_ID = 30204 UdmVarListReplaceStr(Agent-Conf-Vars,QUERY_STRING,val); @@ -1472,6 +1458,7 @@ if ((!strcasecmp(ul,Agent-Conf-Vars.Var[i].name))|| (!strcasecmp(cat,Agent-Conf-Vars.Var[i].name))|| (!strcasecmp(t,Agent-Conf-Vars.Var[i].name))|| + (!strcasecmp(type,Agent-Conf-Vars.Var[i].name))|| (!strcasecmp(lang,Agent-Conf-Vars.Var[i].name))) { UDM_FREE(Agent-Conf-Vars.Var[i].name); UDM_FREE(Agent-Conf-Vars.Var[i].val); @@ -1553,136 +1540,6 @@ /* }}} */ #endif -#if UDM_VERSION_ID == 30203 - -static ssize_t UdmRecvAll(int s, void *buf, size_t len, int flags) { - size_t received = 0, r; - char *b = buf; - while ( (received len) ((r = recv(s, b[received], len - received, flags)) = 0 ) ) { -received += r; - } -
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Mon Feb 16 11:11:56 2004 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - A fix to make UDM_LIMIT_DATE work was applied. Thanx to d.rousseau at nnx.com http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.86r2=1.87ty=u Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.86 php-src/ext/mnogosearch/php_mnogo.c:1.87 --- php-src/ext/mnogosearch/php_mnogo.c:1.86Thu Jan 8 03:16:08 2004 +++ php-src/ext/mnogosearch/php_mnogo.c Mon Feb 16 11:11:55 2004 @@ -1,5 +1,5 @@ /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.86 2004/01/08 08:16:08 andi Exp $ */ +/* $Id: php_mnogo.c,v 1.87 2004/02/16 16:11:55 gluke Exp $ */ /* +--+ @@ -1394,6 +1394,48 @@ stl_info.t1=(time_t)(atol(val+1)); UdmAddTimeLimit(Agent-Conf,stl_info); } +#elif UDM_VERSION_ID = 30210 +{ + struct tm *d_tm; +time_t d_t; +char*d_val2; +chard_db[20], d_de[20]; +d_t = atol (val+1); +d_tm = localtime (d_t); +if (val[0] == '') { + UdmVarListReplaceStr(Agent-Conf-Vars,dt,er); +UdmVarListReplaceStr(Agent-Conf-Vars,dx,1); +sprintf (d_db, %d, d_tm-tm_mday); +UdmVarListReplaceStr(Agent-Conf-Vars,dd,d_db); +sprintf (d_db, %d, d_tm-tm_mon); +UdmVarListReplaceStr(Agent-Conf-Vars,dm,d_db); +sprintf (d_db, %d, d_tm-tm_year+1900); +UdmVarListReplaceStr(Agent-Conf-Vars,dy,d_db); +RETURN_TRUE; +} else if (val[0] == '') { +UdmVarListReplaceStr(Agent-Conf-Vars,dt,er); +UdmVarListReplaceStr(Agent-Conf-Vars,dx,-1); +sprintf (d_db, %d, d_tm-tm_mday); +UdmVarListReplaceStr(Agent-Conf-Vars,dd,d_db); +sprintf (d_db, %d, d_tm-tm_mon); +UdmVarListReplaceStr(Agent-Conf-Vars,dm,d_db); +sprintf (d_db, %d, d_tm-tm_year+1900); +UdmVarListReplaceStr(Agent-Conf-Vars,dy,d_db); +RETURN_TRUE; +} else if ( (val[0]=='#') (d_val2 = strchr(val,',')) ){ +UdmVarListReplaceStr(Agent-Conf-Vars,dt,range); +sprintf (d_db, %d/%d/%d, d_tm-tm_mday, d_tm-tm_mon+1, d_tm-tm_year+1900); +d_t = atol (d_val2+1); +d_tm = localtime (d_t); +sprintf (d_de, %d/%d/%d, d_tm-tm_mday, d_tm-tm_mon+1, d_tm-tm_year+1900); +UdmVarListReplaceStr(Agent-Conf-Vars,db,d_db); +UdmVarListReplaceStr(Agent-Conf-Vars,de,d_de); +RETURN_TRUE; +} else { +php_error_docref(NULL TSRMLS_CC, E_WARNING,Incorrect date limit format); +RETURN_FALSE; +} + } #endif break; default: @@ -2200,9 +2242,9 @@ { int len,i; for(len = i = 0; i Res-WWList.nwords; i++) - len += Res-WWList.Word[i].len; + len += Res-WWList.Word[i].len + 64; { - size_t wsize=(1+len*15)*sizeof(char); + size_t wsize=(1+len)*sizeof(char); char *wordinfo = (char*) malloc(wsize); *wordinfo = '\0'; @@ -2230,9 +2272,9 @@ { int len,i,j; for(len = i = 0; i Res-WWList.nwords; i++) - len += Res-WWList.Word[i].len; + len += Res-WWList.Word[i].len + 64; { - size_t wsize=(1+len*15)*sizeof(char); + size_t wsize=(1+len)*sizeof(char); char *wordinfo = (char*) malloc(wsize); int
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Mon Dec 8 03:12:31 2003 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - A bug in Udm_Hash32 function was fixed. Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.84 php-src/ext/mnogosearch/php_mnogo.c:1.85 --- php-src/ext/mnogosearch/php_mnogo.c:1.84Wed Nov 12 02:40:16 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Mon Dec 8 03:12:30 2003 @@ -1,5 +1,5 @@ /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.84 2003/11/12 07:40:16 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.85 2003/12/08 08:12:30 gluke Exp $ */ /* +--+ @@ -1922,7 +1922,11 @@ str = Z_STRVAL_PP(yystr); hash32=UdmHash32((str),strlen(str)); +#if UDM_VERSION_ID = 30215 + snprintf(buf,sizeof(buf)-1,%i,hash32); +#else snprintf(buf,sizeof(buf)-1,%u,hash32); +#endif RETURN_STRING(buf,1); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c
gluke Mon Dec 8 03:24:56 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchphp_mnogo.c Log: - A bug in Udm_Hash32 function was fixed. Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.66.2.10 php-src/ext/mnogosearch/php_mnogo.c:1.66.2.11 --- php-src/ext/mnogosearch/php_mnogo.c:1.66.2.10 Wed Nov 12 02:52:56 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Mon Dec 8 03:24:55 2003 @@ -1,5 +1,5 @@ /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.66.2.10 2003/11/12 07:52:56 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.66.2.11 2003/12/08 08:24:55 gluke Exp $ */ /* +--+ @@ -1922,7 +1922,11 @@ str = Z_STRVAL_PP(yystr); hash32=UdmHash32((str),strlen(str)); +#if UDM_VERSION_ID = 30215 + snprintf(buf,sizeof(buf)-1,%i,hash32); +#else snprintf(buf,sizeof(buf)-1,%u,hash32); +#endif RETURN_STRING(buf,1); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Wed Nov 12 02:40:17 2003 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - A bug in WORDINFO calculation in mnogosearch extension was fixed. Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.83 php-src/ext/mnogosearch/php_mnogo.c:1.84 --- php-src/ext/mnogosearch/php_mnogo.c:1.83Sat Nov 8 09:36:31 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Wed Nov 12 02:40:16 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.83 2003/11/08 14:36:31 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.84 2003/11/12 07:40:16 gluke Exp $ */ /* +--+ @@ -2247,7 +2247,6 @@ } else if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_QUERY) { sprintf(UDM_STREND(wordinfo),%s%s : %d / %d, (*wordinfo) ? , : , Res-WWList.Word[i].word, Res-WWList.Word[i].count, ccount); } else continue; - sprintf(UDM_STREND(wordinfo), / %d, ccount); } RETURN_STRING(wordinfo,1); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c
gluke Wed Nov 12 02:52:57 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchphp_mnogo.c Log: - A WORDINFO calculation in mnogosearch extension was fixed Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.66.2.9 php-src/ext/mnogosearch/php_mnogo.c:1.66.2.10 --- php-src/ext/mnogosearch/php_mnogo.c:1.66.2.9Sat Nov 8 09:39:14 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Wed Nov 12 02:52:56 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.66.2.9 2003/11/08 14:39:14 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.66.2.10 2003/11/12 07:52:56 gluke Exp $ */ /* +--+ @@ -2247,7 +2247,6 @@ } else if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_QUERY) { sprintf(UDM_STREND(wordinfo),%s%s : %d / %d, (*wordinfo) ? , : , Res-WWList.Word[i].word, Res-WWList.Word[i].count, ccount); } else continue; - sprintf(UDM_STREND(wordinfo), / %d, ccount); } RETURN_STRING(wordinfo,1); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Sat Nov 8 09:36:32 2003 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - Mnogosearch Extension was updated to include mnogosearch-3.2.16 features Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.82 php-src/ext/mnogosearch/php_mnogo.c:1.83 --- php-src/ext/mnogosearch/php_mnogo.c:1.82Sun Aug 31 03:00:28 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Sat Nov 8 09:36:31 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.82 2003/08/31 07:00:28 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.83 2003/11/08 14:36:31 gluke Exp $ */ /* +--+ @@ -87,6 +87,8 @@ #define UDM_PARAM_DETECT_CLONES29 #define UDM_PARAM_SORT_ORDER 30 #define UDM_PARAM_RESULTS_LIMIT31 +#define UDM_PARAM_EXCERPT_SIZE 32 +#define UDM_PARAM_EXCERPT_PADDING 33 /* udm_add_search_limit constants */ #define UDM_LIMIT_URL 1 @@ -327,6 +329,9 @@ 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); + REGISTER_LONG_CONSTANT(UDM_PARAM_EXCERPT_SIZE,UDM_PARAM_EXCERPT_SIZE,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(UDM_PARAM_EXCERPT_PADDING,UDM_PARAM_EXCERPT_PADDING,CONST_CS | CONST_PERSISTENT); + /* udm_add_search_limit constants */ REGISTER_LONG_CONSTANT(UDM_LIMIT_CAT, UDM_LIMIT_CAT,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(UDM_LIMIT_URL, UDM_LIMIT_URL,CONST_CS | CONST_PERSISTENT); @@ -1108,6 +1113,17 @@ break; #endif + +#if UDM_VERSION_ID = 30216 + case UDM_PARAM_EXCERPT_SIZE: + UdmVarListReplaceStr(Agent-Conf-Vars,ExcerptSize,val); + + break; + case UDM_PARAM_EXCERPT_PADDING: + UdmVarListReplaceStr(Agent-Conf-Vars,ExcerptPadding,val); + + break; +#endif default: php_error_docref(NULL TSRMLS_CC, E_WARNING,Unknown agent session parameter); RETURN_FALSE; @@ -1684,11 +1700,22 @@ char*al; char*Excerpt; +#if UDM_VERSION_ID = 30216 + size_t ExcerptSize, ExcerptPadding; + + ExcerptSize = (size_t)UdmVarListFindInt(Agent-Conf-Vars, ExcerptSize, 256); + ExcerptPadding = (size_t)UdmVarListFindInt(Agent-Conf-Vars, ExcerptPadding, 40); +#endif + al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), URL, ))); UdmVarListReplaceInt((Res-Doc[row].Sections), STORED_ID, UdmCRC32(al, strlen(al))); free(al); +#if UDM_VERSION_ID = 30216 + Excerpt = UdmExcerptDoc(Agent, Res, (Res-Doc[row]), ExcerptSize, ExcerptPadding); +#else Excerpt = UdmExcerptDoc(Agent, Res, (Res-Doc[row]), 256); +#endif if ((Excerpt != NULL) (strlen(Excerpt) 6)) { char *HlExcerpt = UdmHlConvert(Res-WWList, Excerpt, Agent-Conf-lcs, Agent-Conf-bcs); @@ -2218,7 +2245,7 @@ if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_STOP) { sprintf(UDM_STREND(wordinfo),%s%s : stopword, (*wordinfo) ? , : , Res-WWList.Word[i].word); } else if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_QUERY) { - sprintf(UDM_STREND(wordinfo),%s%s : %d, (*wordinfo) ? , : , Res-WWList.Word[i].word, Res-WWList.Word[i].count); + sprintf(UDM_STREND(wordinfo),%s%s : %d / %d, (*wordinfo) ? , : , Res-WWList.Word[i].word, Res-WWList.Word[i].count, ccount); } else continue; sprintf(UDM_STREND(wordinfo), / %d, ccount); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c
gluke Sat Nov 8 09:39:15 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchphp_mnogo.c Log: - Mnogosearch extension wsa updated to include mnogosearch-3.2.16 features. Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.66.2.8 php-src/ext/mnogosearch/php_mnogo.c:1.66.2.9 --- php-src/ext/mnogosearch/php_mnogo.c:1.66.2.8Sun Aug 31 02:58:56 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Sat Nov 8 09:39:14 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.66.2.8 2003/08/31 06:58:56 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.66.2.9 2003/11/08 14:39:14 gluke Exp $ */ /* +--+ @@ -87,6 +87,8 @@ #define UDM_PARAM_DETECT_CLONES29 #define UDM_PARAM_SORT_ORDER 30 #define UDM_PARAM_RESULTS_LIMIT31 +#define UDM_PARAM_EXCERPT_SIZE 32 +#define UDM_PARAM_EXCERPT_PADDING 33 /* udm_add_search_limit constants */ #define UDM_LIMIT_URL 1 @@ -327,6 +329,9 @@ 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); + REGISTER_LONG_CONSTANT(UDM_PARAM_EXCERPT_SIZE,UDM_PARAM_EXCERPT_SIZE,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(UDM_PARAM_EXCERPT_PADDING,UDM_PARAM_EXCERPT_PADDING,CONST_CS | CONST_PERSISTENT); + /* udm_add_search_limit constants */ REGISTER_LONG_CONSTANT(UDM_LIMIT_CAT, UDM_LIMIT_CAT,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(UDM_LIMIT_URL, UDM_LIMIT_URL,CONST_CS | CONST_PERSISTENT); @@ -1108,6 +1113,17 @@ break; #endif + +#if UDM_VERSION_ID = 30216 + case UDM_PARAM_EXCERPT_SIZE: + UdmVarListReplaceStr(Agent-Conf-Vars,ExcerptSize,val); + + break; + case UDM_PARAM_EXCERPT_PADDING: + UdmVarListReplaceStr(Agent-Conf-Vars,ExcerptPadding,val); + + break; +#endif default: php_error_docref(NULL TSRMLS_CC, E_WARNING,Unknown agent session parameter); RETURN_FALSE; @@ -1684,11 +1700,22 @@ char*al; char*Excerpt; +#if UDM_VERSION_ID = 30216 + size_t ExcerptSize, ExcerptPadding; + + ExcerptSize = (size_t)UdmVarListFindInt(Agent-Conf-Vars, ExcerptSize, 256); + ExcerptPadding = (size_t)UdmVarListFindInt(Agent-Conf-Vars, ExcerptPadding, 40); +#endif + al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), URL, ))); UdmVarListReplaceInt((Res-Doc[row].Sections), STORED_ID, UdmCRC32(al, strlen(al))); free(al); +#if UDM_VERSION_ID = 30216 + Excerpt = UdmExcerptDoc(Agent, Res, (Res-Doc[row]), ExcerptSize, ExcerptPadding); +#else Excerpt = UdmExcerptDoc(Agent, Res, (Res-Doc[row]), 256); +#endif if ((Excerpt != NULL) (strlen(Excerpt) 6)) { char *HlExcerpt = UdmHlConvert(Res-WWList, Excerpt, Agent-Conf-lcs, Agent-Conf-bcs); @@ -2218,7 +2245,7 @@ if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_STOP) { sprintf(UDM_STREND(wordinfo),%s%s : stopword, (*wordinfo) ? , : , Res-WWList.Word[i].word); } else if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_QUERY) { - sprintf(UDM_STREND(wordinfo),%s%s : %d, (*wordinfo) ? , : , Res-WWList.Word[i].word, Res-WWList.Word[i].count); + sprintf(UDM_STREND(wordinfo),%s%s : %d / %d, (*wordinfo) ? , : , Res-WWList.Word[i].word, Res-WWList.Word[i].count, ccount); } else continue; sprintf(UDM_STREND(wordinfo), / %d, ccount); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c
Hi! MB This looks like new features in a bugfix release. This is compilation fixes if using with mnogosearch-3.2.16-CVS. We discussed about such mnogosearch module changes this July, and decided to permit such changes since they are cound not make harm while maintaining backwards compatilbility. -- Regards, Sergey aka gluke. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mnogosearch README
gluke Sat Oct 4 04:27:35 2003 EDT Modified files: /php-src/ext/mnogosearchREADME Log: - Updated README for mnogosearch extension Index: php-src/ext/mnogosearch/README diff -u php-src/ext/mnogosearch/README:1.9 php-src/ext/mnogosearch/README:1.10 --- php-src/ext/mnogosearch/README:1.9 Sat Jun 29 06:42:52 2002 +++ php-src/ext/mnogosearch/README Sat Oct 4 04:27:34 2003 @@ -1,5 +1,5 @@ $Source: /usr/repository/php-src/ext/mnogosearch/README,v $ -$Id: README,v 1.9 2002/06/29 10:42:52 gluke Exp $ +$Id: README,v 1.10 2003/10/04 08:27:34 gluke Exp $ mnoGoSearch extension module for PHP4. @@ -9,3 +9,16 @@ in the php distribution. You should use native mysql library. To do this you should compile php with specefying mysql-dir (for example --with-mysql=/usr, not --with-mysql). + +To compile PHP with CVS versions of mnogosearch (not with official releases) +you must open configure script of mnogosearch in your editor. Find +line like the following: + +VERSION=x.x.x-`date +%d%m%Y` + +where x.x.x is the mnogosearch version number like 3.2.16 or so. +Then just remove -`date +%d%m%Y`. After that this line should be +VERSION=x.x.x + +After complete you should reconfigure, recompile, reinstall mnogosearch and +php. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch README
gluke Sat Oct 4 05:43:46 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchREADME Log: - README in mnogosearch extension is updated Index: php-src/ext/mnogosearch/README diff -u php-src/ext/mnogosearch/README:1.9 php-src/ext/mnogosearch/README:1.9.4.1 --- php-src/ext/mnogosearch/README:1.9 Sat Jun 29 06:42:52 2002 +++ php-src/ext/mnogosearch/README Sat Oct 4 05:43:45 2003 @@ -1,5 +1,5 @@ $Source: /usr/repository/php-src/ext/mnogosearch/README,v $ -$Id: README,v 1.9 2002/06/29 10:42:52 gluke Exp $ +$Id: README,v 1.9.4.1 2003/10/04 09:43:45 gluke Exp $ mnoGoSearch extension module for PHP4. @@ -9,3 +9,16 @@ in the php distribution. You should use native mysql library. To do this you should compile php with specefying mysql-dir (for example --with-mysql=/usr, not --with-mysql). + +To compile PHP with CVS versions of mnogosearch (not with official releases) +you must open configure script of mnogosearch in your editor. Find +line like the following: + +VERSION=x.x.x-`date +%d%m%Y` + +where x.x.x is the mnogosearch version number like 3.2.16 or so. +Then just remove -`date +%d%m%Y`. After that this line should be +VERSION=x.x.x + +After complete you should reconfigure, recompile, reinstall mnogosearch and +php. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c
Hi! + REGISTER_LONG_CONSTANT(UDM_PARAM_RESULTS_LIMIT,UDM_PARAM_RESULTS_LIMIT,CONST_CS | CONST_PERSISTENT); JT Shouldn't that be wrapped inside the #if UDM_VERSION_ID = 30215 .. #endif too?? I think this is not nesessary, since constant declarations are local to extension and there is no harm if it is declared for earlier versions. JT Also, wouldn't it be much easier for you to put this extension into PECL? JT You could release new versions more often.. I thought abount that, but i still sure that putting extensions into php is much better for end-users (there no additional packages to worry about to find required extension). Possibly the best way is to duplicate extension in PECL and php both giving the users possibility to stay on the cutting edge with the favourite extension. This is only my opinion of course. -- Regards, Sergey aka gluke. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[3]: [PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c
Hi! Monday, September 1, 2003, 1:58:57 PM, you wrote: + REGISTER_LONG_CONSTANT(UDM_PARAM_RESULTS_LIMIT,UDM_PARAM_RESULTS_LIMIT,CONST_CS | CONST_PERSISTENT); Shouldn't that be wrapped inside the #if UDM_VERSION_ID = 30215 .. #endif too?? I think this is not nesessary, since constant declarations are local to extension and there is no harm if it is declared for earlier versions. JT But is that constant _defined_ in earlier versions??? JT (speaking of UDM_PARAM_RESULTS_LIMIT, in the C side) No, for earlier version there is no matter if this constant is defined or not. Value of this constant is defined in the beginning for all versions: #define UDM_PARAM_RESULTS_LIMIT 31 so registration of constant will not fail for earlier versions Mnogosearch extension has functions to determine which version of mnogosearch library is compiled with PHP and so, users can write their scripts to make use of this constant if library can deal with it. -- Regards, Sergey aka gluke. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Sun Aug 31 03:00:30 2003 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - a new UDM_PARAM_SEARCH_RESULTS mnogosearch API command added to limit maximum number of search results Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.81 php-src/ext/mnogosearch/php_mnogo.c:1.82 --- php-src/ext/mnogosearch/php_mnogo.c:1.81Fri Aug 29 09:35:25 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Sun Aug 31 03:00:28 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.81 2003/08/29 13:35:25 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.82 2003/08/31 07:00:28 gluke Exp $ */ /* +--+ @@ -86,6 +86,7 @@ #define UDM_PARAM_SITEID 28 #define UDM_PARAM_DETECT_CLONES29 #define UDM_PARAM_SORT_ORDER 30 +#define UDM_PARAM_RESULTS_LIMIT31 /* udm_add_search_limit constants */ #define UDM_LIMIT_URL 1 @@ -324,6 +325,7 @@ 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 @@ 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; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Fri Jul 18 04:37:17 2003 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - Coredump in Udm_Find was fixed. Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.78 php-src/ext/mnogosearch/php_mnogo.c:1.79 --- php-src/ext/mnogosearch/php_mnogo.c:1.78Tue Jul 8 10:00:19 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Fri Jul 18 04:37:17 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.78 2003/07/08 14:00:19 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.79 2003/07/18 08:37:17 gluke Exp $ */ /* +--+ @@ -1895,6 +1895,7 @@ if (zend_get_parameters_ex(2, yyagent,yyquery)==FAILURE) { RETURN_FALSE; } + convert_to_string_ex(yyquery); } break; default: @@ -1902,7 +1903,6 @@ break; } ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, id, mnoGoSearch-Agent, le_link); - convert_to_string_ex(yyquery); #if UDM_VERSION_ID 30200 if ((Res=UdmFind(Agent,UdmTolower(Z_STRVAL_PP(yyquery),Agent-charset { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c
gluke Fri Jul 18 04:48:33 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchphp_mnogo.c Log: - Coredump in Udm_Find was fixed. Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.66.2.5 php-src/ext/mnogosearch/php_mnogo.c:1.66.2.6 --- php-src/ext/mnogosearch/php_mnogo.c:1.66.2.5Tue Jul 8 10:00:57 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Fri Jul 18 04:48:33 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.66.2.5 2003/07/08 14:00:57 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.66.2.6 2003/07/18 08:48:33 gluke Exp $ */ /* +--+ @@ -1895,6 +1895,7 @@ if (zend_get_parameters_ex(2, yyagent,yyquery)==FAILURE) { RETURN_FALSE; } + convert_to_string_ex(yyquery); } break; default: @@ -1902,7 +1903,6 @@ break; } ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, id, mnoGoSearch-Agent, le_link); - convert_to_string_ex(yyquery); #if UDM_VERSION_ID 30200 if ((Res=UdmFind(Agent,UdmTolower(Z_STRVAL_PP(yyquery),Agent-charset { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Fri Jul 18 05:14:23 2003 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - 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. Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.79 php-src/ext/mnogosearch/php_mnogo.c:1.80 --- php-src/ext/mnogosearch/php_mnogo.c:1.79Fri Jul 18 04:37:17 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Fri Jul 18 05:14:23 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.79 2003/07/18 08:37:17 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.80 2003/07/18 09:14:23 gluke Exp $ */ /* +--+ @@ -85,6 +85,7 @@ #define UDM_PARAM_GROUPBYSITE 27 #define UDM_PARAM_SITEID 28 #define UDM_PARAM_DETECT_CLONES29 +#define UDM_PARAM_SORT_ORDER 30 /* udm_add_search_limit constants */ #define UDM_LIMIT_URL 1 @@ -322,6 +323,7 @@ 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); @@ -1080,6 +1082,13 @@ break; } + break; +#endif + +#if UDM_VERSION_ID = 30214 + case UDM_PARAM_SORT_ORDER: + UdmVarListReplaceStr(Agent-Conf-Vars,s,val); + break; #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c
gluke Fri Jul 18 05:15:04 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchphp_mnogo.c Log: - 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. Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.66.2.6 php-src/ext/mnogosearch/php_mnogo.c:1.66.2.7 --- php-src/ext/mnogosearch/php_mnogo.c:1.66.2.6Fri Jul 18 04:48:33 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Fri Jul 18 05:15:04 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.66.2.6 2003/07/18 08:48:33 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.66.2.7 2003/07/18 09:15:04 gluke Exp $ */ /* +--+ @@ -85,6 +85,7 @@ #define UDM_PARAM_GROUPBYSITE 27 #define UDM_PARAM_SITEID 28 #define UDM_PARAM_DETECT_CLONES29 +#define UDM_PARAM_SORT_ORDER 30 /* udm_add_search_limit constants */ #define UDM_LIMIT_URL 1 @@ -322,6 +323,7 @@ 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); @@ -1080,6 +1082,13 @@ break; } + break; +#endif + +#if UDM_VERSION_ID = 30214 + case UDM_PARAM_SORT_ORDER: + UdmVarListReplaceStr(Agent-Conf-Vars,s,val); + break; #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c
gluke Tue Jul 8 09:27:29 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchphp_mnogo.c Log: - Udm_Find function is fixed to be compatible with mnogosearch-3.2.13 Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.66.2.3 php-src/ext/mnogosearch/php_mnogo.c:1.66.2.4 --- php-src/ext/mnogosearch/php_mnogo.c:1.66.2.3Mon Jun 30 13:44:19 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Tue Jul 8 09:27:29 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.66.2.3 2003/06/30 17:44:19 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.66.2.4 2003/07/08 13:27:29 gluke Exp $ */ /* +--+ @@ -7,10 +7,10 @@ +--+ | Copyright (c) 1997-2003 The PHP Group| +--+ - | This source file is subject to version 2.02 of the PHP license, | + | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| - | available at through the world-wide-web at | - | http://www.php.net/license/2_02.txt. | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_0.txt. | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immediately. | @@ -1883,6 +1883,14 @@ int id=-1; switch(ZEND_NUM_ARGS()){ +#if UDM_VERSION_ID = 30213 + case 1: { + if (zend_get_parameters_ex(1, yyagent)==FAILURE) { + RETURN_FALSE; + } + } + break; +#endif case 2: { if (zend_get_parameters_ex(2, yyagent,yyquery)==FAILURE) { RETURN_FALSE; @@ -1899,7 +1907,11 @@ #if UDM_VERSION_ID 30200 if ((Res=UdmFind(Agent,UdmTolower(Z_STRVAL_PP(yyquery),Agent-charset { #else +#if UDM_VERSION_ID = 30213 + if ((Res=UdmFind(Agent))) { +#else if ((Res=UdmFind(Agent,Z_STRVAL_PP(yyquery { +#endif #endif ZEND_REGISTER_RESOURCE(return_value,Res,le_res); } else { @@ -2381,7 +2393,6 @@ add_next_index_stringl(return_value, C.Category[i].name,strlen(C.Category[i].name),1); } } else { - free(buf); RETURN_FALSE; } } @@ -2456,7 +2467,6 @@ add_next_index_stringl(return_value, C.Category[i].name,strlen(C.Category[i].name),1); } } else { - free(buf); RETURN_FALSE; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Tue Jul 8 09:28:16 2003 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - Udm_Find function is fixed to be compatible with mnogosearch-3.2.13 Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.76 php-src/ext/mnogosearch/php_mnogo.c:1.77 --- php-src/ext/mnogosearch/php_mnogo.c:1.76Mon Jun 30 13:12:17 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Tue Jul 8 09:28:16 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.76 2003/06/30 17:12:17 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.77 2003/07/08 13:28:16 gluke Exp $ */ /* +--+ @@ -439,7 +439,7 @@ return res; } -/* {{{ proto resource udm_alloc_agent(string dbaddr [, string dbmode]) +/* {{{ proto int udm_alloc_agent(string dbaddr [, string dbmode]) Allocate mnoGoSearch session */ DLEXPORT PHP_FUNCTION(udm_alloc_agent) { @@ -561,7 +561,7 @@ } /* }}} */ -/* {{{ proto bool udm_set_agent_param(resource agent, int var, string val) +/* {{{ proto int udm_set_agent_param(int agent, int var, string val) Set mnoGoSearch agent session parameters */ DLEXPORT PHP_FUNCTION(udm_set_agent_param) { @@ -1092,7 +1092,7 @@ } /* }}} */ -/* {{{ proto bool udm_load_ispell_data(resource agent, int var, string val1 [, string charset], string val2, int flag) +/* {{{ proto int udm_load_ispell_data(int agent, int var, string val1, [string charset], string val2, int flag) Load ispell data */ DLEXPORT PHP_FUNCTION(udm_load_ispell_data) { @@ -1235,7 +1235,7 @@ } /* }}} */ -/* {{{ proto bool udm_free_ispell_data(resource agent) +/* {{{ proto int udm_free_ispell_data(int agent) Free memory allocated for ispell data */ DLEXPORT PHP_FUNCTION(udm_free_ispell_data) { @@ -1265,7 +1265,7 @@ } /* }}} */ -/* {{{ proto bool udm_add_search_limit(resource agent, int var, string val) +/* {{{ proto int udm_add_search_limit(int agent, int var, string val) Add mnoGoSearch search restrictions */ DLEXPORT PHP_FUNCTION(udm_add_search_limit) { @@ -1364,7 +1364,7 @@ } /* }}} */ -/* {{{ proto bool udm_clear_search_limits(resource agent) +/* {{{ proto int udm_clear_search_limits(int agent) Clear all mnoGoSearch search restrictions */ DLEXPORT PHP_FUNCTION(udm_clear_search_limits) { @@ -1403,7 +1403,7 @@ /* }}} */ #if UDM_VERSION_ID = 30200 -/* {{{ proto bool udm_check_charset(resource agent, string charset) +/* {{{ proto int udm_check_charset(int agent, string charset) Check if the given charset is known to mnogosearch */ DLEXPORT PHP_FUNCTION(udm_check_charset) { @@ -1436,7 +1436,7 @@ #endif #if UDM_VERSION_ID = 30203 -/* {{{ proto string udm_crc32(resource agent, string str) +/* {{{ proto int udm_crc32(int agent, string str) Return CRC32 checksum of gived string */ DLEXPORT PHP_FUNCTION(udm_crc32) { @@ -1482,7 +1482,7 @@ } -/* {{{ proto int udm_open_stored(resource agent, string storedaddr) +/* {{{ proto int udm_open_stored(int agent, string storedaddr) Open connection to stored */ DLEXPORT PHP_FUNCTION(udm_open_stored) { @@ -1523,7 +1523,7 @@ } /* }}} */ -/* {{{ proto bool udm_close_stored(resource agent, int link) +/* {{{ proto int udm_close_stored(int agent, int link) Open connection to stored */ DLEXPORT PHP_FUNCTION(udm_close_stored) { @@ -1559,7 +1559,7 @@ } /* }}} */ -/* {{{ proto int udm_check_stored(resource agent, int link, string doc_id) +/* {{{ proto int udm_check_stored(int agent, int link, string doc_id) Open connection to stored */ DLEXPORT PHP_FUNCTION(udm_check_stored) { @@ -1601,7 +1601,7 @@ #endif #if UDM_VERSION_ID = 30204 -/* {{{ proto bool udm_parse_query_string(resource agent, string str) +/* {{{ proto int udm_parse_query_string(int agent, string str) Parses query string, initialises variables and search limits taken from it */ DLEXPORT PHP_FUNCTION(udm_parse_query_string) { @@ -1630,7 +1630,7 @@ } /* }}} */ -/* {{{ proto bool udm_make_excerpt(resource agent, resource res, int row) +/* {{{ proto int udm_make_excerpt(int agent, int res, int row) Perform search */ DLEXPORT PHP_FUNCTION(udm_make_excerpt) { @@ -1686,7 +1686,7 @@ } /* }}} */ -/* {{{ proto bool udm_set_agent_param_ex(resource agent, string var, string val) +/* {{{ proto int udm_set_agent_param_ex(int agent, string var, string val) Set mnoGoSearch agent session parameters extended */ DLEXPORT PHP_FUNCTION(udm_set_agent_param_ex) { @@ -1744,7 +1744,7 @@ RETURN_TRUE; } -/* {{{ proto string udm_get_res_field_ex(resource res, int row, string field) +/* {{{ proto string udm_get_res_field_ex(int res, int row, string field) Fetch mnoGoSearch result field */ DLEXPORT PHP_FUNCTION(udm_get_res_field_ex) { @@ -1788,7 +1788,7 @@ #endif #if UDM_VERSION_ID = 30211 -/* {{{ proto resource udm_alloc_agent_array(array dbaddr) +/* {{{
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Tue Jul 8 10:00:19 2003 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - Output of UDM_PARAM_WORDINFO_ALL was fixed Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.77 php-src/ext/mnogosearch/php_mnogo.c:1.78 --- php-src/ext/mnogosearch/php_mnogo.c:1.77Tue Jul 8 09:28:16 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Tue Jul 8 10:00:19 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.77 2003/07/08 13:28:16 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.78 2003/07/08 14:00:19 gluke Exp $ */ /* +--+ @@ -2148,8 +2148,9 @@ *wordinfo = '\0'; for(i = 0; i Res-WWList.nwords; i++){ - if ((Res-WWList.Word[i].count 0) || (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_QUERY)) { - if(wordinfo[0]) strcat(wordinfo,, ); + if ((Res-WWList.Word[i].count 0) || + (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_QUERY)) { + if(wordinfo[0]) strcat(wordinfo,, ); sprintf(UDM_STREND(wordinfo), %s : %d, Res-WWList.Word[i].word, Res-WWList.Word[i].count); } else if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_STOP) { if(wordinfo[0]) strcat(wordinfo,, ); @@ -2167,7 +2168,7 @@ #if UDM_VERSION_ID = 30204 case UDM_PARAM_WORDINFO_ALL: { - int len,i; + int len,i,j; for(len = i = 0; i Res-WWList.nwords; i++) len += Res-WWList.Word[i].len; { @@ -2177,23 +2178,19 @@ *wordinfo = '\0'; - for(i = 0; i Res-WWList.nwords; i++){ - if (Res-WWList.Word[i].order != corder) { - if(wordinfo[0]) { - sprintf(UDM_STREND(wordinfo), / %d, , ccount); - } - ccount = Res-WWList.Word[i].count; - if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_STOP) { - sprintf(UDM_STREND(wordinfo), %s : stopword, Res-WWList.Word[i].word); - } else { - sprintf(UDM_STREND(wordinfo), %s : %d, Res-WWList.Word[i].word, Res-WWList.Word[i].count); - corder = Res-WWList.Word[i].order; - } - } else { - ccount += Res-WWList.Word[i].count; + for(i = 0; i Res-WWList.nwords; i++) { + corder = Res-WWList.Word[i].order; + ccount = 0; + for(j = 0; j Res-WWList.nwords; j++) { + if (Res-WWList.Word[j].order == corder) { + ccount += Res-WWList.Word[j].count; + } } - } - if (Res-WWList.nwords) { + if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_STOP) { + sprintf(UDM_STREND(wordinfo),%s%s : stopword, (*wordinfo) ? , : , Res-WWList.Word[i].word); + } else if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_QUERY) { + sprintf(UDM_STREND(wordinfo),%s%s : %d, (*wordinfo) ? , : , Res-WWList.Word[i].word, Res-WWList.Word[i].count); + } else continue; sprintf(UDM_STREND(wordinfo), / %d, ccount); } RETURN_STRING(wordinfo,1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c
gluke Tue Jul 8 10:00:57 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchphp_mnogo.c Log: - Output of UDM_PARAM_WORDINFO_ALL was fixed Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.66.2.4 php-src/ext/mnogosearch/php_mnogo.c:1.66.2.5 --- php-src/ext/mnogosearch/php_mnogo.c:1.66.2.4Tue Jul 8 09:27:29 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Tue Jul 8 10:00:57 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.66.2.4 2003/07/08 13:27:29 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.66.2.5 2003/07/08 14:00:57 gluke Exp $ */ /* +--+ @@ -2148,8 +2148,9 @@ *wordinfo = '\0'; for(i = 0; i Res-WWList.nwords; i++){ - if ((Res-WWList.Word[i].count 0) || (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_QUERY)) { - if(wordinfo[0]) strcat(wordinfo,, ); + if ((Res-WWList.Word[i].count 0) || + (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_QUERY)) { + if(wordinfo[0]) strcat(wordinfo,, ); sprintf(UDM_STREND(wordinfo), %s : %d, Res-WWList.Word[i].word, Res-WWList.Word[i].count); } else if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_STOP) { if(wordinfo[0]) strcat(wordinfo,, ); @@ -2167,7 +2168,7 @@ #if UDM_VERSION_ID = 30204 case UDM_PARAM_WORDINFO_ALL: { - int len,i; + int len,i,j; for(len = i = 0; i Res-WWList.nwords; i++) len += Res-WWList.Word[i].len; { @@ -2177,23 +2178,19 @@ *wordinfo = '\0'; - for(i = 0; i Res-WWList.nwords; i++){ - if (Res-WWList.Word[i].order != corder) { - if(wordinfo[0]) { - sprintf(UDM_STREND(wordinfo), / %d, , ccount); - } - ccount = Res-WWList.Word[i].count; - if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_STOP) { - sprintf(UDM_STREND(wordinfo), %s : stopword, Res-WWList.Word[i].word); - } else { - sprintf(UDM_STREND(wordinfo), %s : %d, Res-WWList.Word[i].word, Res-WWList.Word[i].count); - corder = Res-WWList.Word[i].order; - } - } else { - ccount += Res-WWList.Word[i].count; + for(i = 0; i Res-WWList.nwords; i++) { + corder = Res-WWList.Word[i].order; + ccount = 0; + for(j = 0; j Res-WWList.nwords; j++) { + if (Res-WWList.Word[j].order == corder) { + ccount += Res-WWList.Word[j].count; + } } - } - if (Res-WWList.nwords) { + if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_STOP) { + sprintf(UDM_STREND(wordinfo),%s%s : stopword, (*wordinfo) ? , : , Res-WWList.Word[i].word); + } else if (Res-WWList.Word[i].origin == UDM_WORD_ORIGIN_QUERY) { + sprintf(UDM_STREND(wordinfo),%s%s : %d, (*wordinfo) ? , : , Res-WWList.Word[i].word, Res-WWList.Word[i].count); + } else continue; sprintf(UDM_STREND(wordinfo), / %d, ccount); } RETURN_STRING(wordinfo,1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Mon Jun 30 13:12:18 2003 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - Memory leaks in UdmCatPath and UdmCatList functions have been fixed. Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.75 php-src/ext/mnogosearch/php_mnogo.c:1.76 --- php-src/ext/mnogosearch/php_mnogo.c:1.75Mon Jun 16 11:40:35 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Mon Jun 30 13:12:17 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.75 2003/06/16 15:40:35 andrey Exp $ */ +/* $Id: php_mnogo.c,v 1.76 2003/06/30 17:12:17 gluke Exp $ */ /* +--+ @@ -2381,7 +2381,7 @@ add_next_index_stringl(return_value, C.Category[i].name,strlen(C.Category[i].name),1); } } else { - /* Possible leak ? 'buf' not free()-d */ + free(buf); RETURN_FALSE; } } @@ -2456,7 +2456,7 @@ add_next_index_stringl(return_value, C.Category[i].name,strlen(C.Category[i].name),1); } } else { - /* Possible leak ? 'buf' not free()-d */ + free(buf); RETURN_FALSE; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c
gluke Mon Jun 30 13:44:19 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mnogosearchphp_mnogo.c Log: - A memory leaks at UdmCatPath and UdmCatList functions have been fixed. Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.66.2.2 php-src/ext/mnogosearch/php_mnogo.c:1.66.2.3 --- php-src/ext/mnogosearch/php_mnogo.c:1.66.2.2Sat Jun 14 14:45:23 2003 +++ php-src/ext/mnogosearch/php_mnogo.c Mon Jun 30 13:44:19 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.66.2.2 2003/06/14 18:45:23 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.66.2.3 2003/06/30 17:44:19 gluke Exp $ */ /* +--+ @@ -2381,6 +2381,7 @@ add_next_index_stringl(return_value, C.Category[i].name,strlen(C.Category[i].name),1); } } else { + free(buf); RETURN_FALSE; } } @@ -2455,6 +2456,7 @@ add_next_index_stringl(return_value, C.Category[i].name,strlen(C.Category[i].name),1); } } else { + free(buf); RETURN_FALSE; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mnogosearch php_mnogo.c php_mnogo.h
gluke Sat Jun 14 14:45:23 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mnogosearch php_mnogo.c php_mnogo.h Log: @- Mnogosearch extension updated. Now can compile with mnogosearch-3.2.11+ - Mnogosearch extension updated. Now can compile with mnogosearch-3.2.11+ Index: php4/ext/mnogosearch/php_mnogo.c diff -u php4/ext/mnogosearch/php_mnogo.c:1.66.2.1 php4/ext/mnogosearch/php_mnogo.c:1.66.2.2 --- php4/ext/mnogosearch/php_mnogo.c:1.66.2.1 Tue Dec 31 11:34:55 2002 +++ php4/ext/mnogosearch/php_mnogo.cSat Jun 14 14:45:23 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.66.2.1 2002/12/31 16:34:55 sebastian Exp $ */ +/* $Id: php_mnogo.c,v 1.66.2.2 2003/06/14 18:45:23 gluke Exp $ */ /* +--+ @@ -163,6 +163,12 @@ #if UDM_VERSION_ID = 30204 PHP_FE(udm_parse_query_string, NULL) PHP_FE(udm_make_excerpt,NULL) + PHP_FE(udm_set_agent_param_ex, NULL) + PHP_FE(udm_get_res_field_ex,NULL) +#endif +#if UDM_VERSION_ID = 30211 + PHP_FE(udm_hash32, NULL) + PHP_FE(udm_alloc_agent_array, NULL) #endif #endif @@ -456,7 +462,7 @@ UdmVarListReplaceStr(Env-Vars,SyslogFacility,local7); UdmSetLogLevel(Env,0); UdmOpenLog(mnoGoSearch-php,Env,0); - +#if UDM_VERSION_ID = 30210 if(!memcmp(dbaddr,searchd:,8)){ UDM_URL Url; UdmURLParse(Url,dbaddr); @@ -464,13 +470,18 @@ } UdmVarListReplaceStr(Env-Vars,DBAddr,dbaddr); + if(UDM_OK!=UdmDBSetAddr(Env-db,dbaddr,UDM_OPEN_MODE_READ)){ sprintf(Env-errstr,Invalid DBAddr: '%s',dbaddr); +#if UDM_VERSION_ID = 30207 Env-errcode=1; - php_error(E_WARNING,%s(): Invalid DBAddr, get_active_function_name(TSRMLS_C)); +#endif + php_error_docref(NULL TSRMLS_CC, E_WARNING,Invalid DBAddr); RETURN_FALSE; } - +#else + UdmDBListAdd(Env-dbl,dbaddr, UDM_OPEN_MODE_WRITE); +#endif Agent=UdmAgentInit(NULL,Env,0); #elif UDM_VERSION_ID = 30200 Env=UdmAllocEnv(); @@ -508,7 +519,7 @@ UdmVarListReplaceStr(Env-Vars,SyslogFacility,local7); UdmSetLogLevel(Env,0); UdmOpenLog(mnoGoSearch-php,Env,0); - +#if UDM_VERSION_ID = 30210 if(!memcmp(dbaddr,searchd:,8)){ UDM_URL Url; UdmURLParse(Url,dbaddr); @@ -517,10 +528,15 @@ UdmVarListReplaceStr(Env-Vars,DBAddr,dbaddr); if(UDM_OK!=UdmDBSetAddr(Env-db,dbaddr,UDM_OPEN_MODE_READ)){ sprintf(Env-errstr,Invalid DBAddr: '%s',dbaddr); +#if UDM_VERSION_ID = 30207 Env-errcode=1; - php_error(E_WARNING,%s(): Invalid DBAddr, get_active_function_name(TSRMLS_C)); +#endif + php_error_docref(NULL TSRMLS_CC, E_WARNING,Invalid DBAddr); RETURN_FALSE; } +#else + UdmDBListAdd(Env-dbl,dbaddr, UDM_OPEN_MODE_WRITE); +#endif Agent=UdmAgentInit(NULL,Env,0); #elif UDM_VERSION_ID = 30200 Env=UdmAllocEnv(); @@ -620,7 +636,7 @@ case UDM_MODE_PHRASE: #if UDM_VERSION_ID = 30200 - php_error(E_WARNING,%s(): Unknown search mode, get_active_function_name(TSRMLS_C)); + php_error_docref(NULL TSRMLS_CC, E_WARNING,Unknown search mode); RETURN_FALSE; #else Agent-search_mode=UDM_MODE_PHRASE; @@ -633,7 +649,7 @@ #else Agent-search_mode=UDM_MODE_ALL; #endif - php_error(E_WARNING,%s(): Unknown search mode, get_active_function_name(TSRMLS_C)); + php_error_docref(NULL TSRMLS_CC, E_WARNING,Unknown
[PHP-CVS] cvs: php4 /ext/mnogosearch php_mnogo.c
gluke Mon Dec 16 14:17:09 2002 EDT Modified files: /php4/ext/mnogosearch php_mnogo.c Log: - mnogosearch extension updated to compile with mnogosearch-3.2.8 Index: php4/ext/mnogosearch/php_mnogo.c diff -u php4/ext/mnogosearch/php_mnogo.c:1.67 php4/ext/mnogosearch/php_mnogo.c:1.68 --- php4/ext/mnogosearch/php_mnogo.c:1.67 Sun Nov 24 14:36:45 2002 +++ php4/ext/mnogosearch/php_mnogo.cMon Dec 16 14:17:09 2002 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.67 2002/11/24 19:36:45 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.68 2002/12/16 19:17:09 gluke Exp $ */ /* +--+ @@ -468,7 +468,9 @@ UdmVarListReplaceStr(Env-Vars,DBAddr,dbaddr); if(UDM_OK!=UdmDBSetAddr(Env-db,dbaddr,UDM_OPEN_MODE_READ)){ sprintf(Env-errstr,Invalid DBAddr: '%s',dbaddr); +#if UDM_VERSION_ID = 30207 Env-errcode=1; +#endif php_error(E_WARNING,%s(): Invalid DBAddr, get_active_function_name(TSRMLS_C)); RETURN_FALSE; } @@ -519,7 +521,9 @@ UdmVarListReplaceStr(Env-Vars,DBAddr,dbaddr); if(UDM_OK!=UdmDBSetAddr(Env-db,dbaddr,UDM_OPEN_MODE_READ)){ sprintf(Env-errstr,Invalid DBAddr: '%s',dbaddr); +#if UDM_VERSION_ID = 30207 Env-errcode=1; +#endif php_error(E_WARNING,%s(): Invalid DBAddr, get_active_function_name(TSRMLS_C)); RETURN_FALSE; } @@ -999,6 +1003,8 @@ case UDM_PARAM_VARDIR: #if UDM_VERSION_ID 30200 udm_snprintf(Agent-Conf-vardir,sizeof(Agent-Conf-vardir)-1,%s%s,val,UDMSLASHSTR); +#elif UDM_VERSION_ID = 30208 + UdmVarListReplaceStr(Agent-Conf-Vars,Vardir,val); #elif UDM_VERSION_ID = 30204 UdmVarListReplaceStr(Agent-Conf-Vars,Vardir,val); snprintf(Agent-Conf-vardir,sizeof(Agent-Conf-vardir)-1,%s%s,val,UDMSLASHSTR); @@ -1717,8 +1723,10 @@ Agent-Conf-WordParam.min_word_len=atoi(val); } else if (!strcasecmp(var,MaxWordLen)) { Agent-Conf-WordParam.max_word_len=atoi(val); +#if UDM_VERSION_ID = 30207 } else if (!strcasecmp(var,VarDir)) { snprintf(Agent-Conf-vardir,sizeof(Agent-Conf-vardir)-1,%s%s,val,UDMSLASHSTR); +#endif } RETURN_TRUE; @@ -2171,7 +2179,13 @@ break; } ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, mnoGoSearch-Agent, le_link); -#if UDM_VERSION_ID = 30204 +#if UDM_VERSION_ID = 30208 + if (UdmEnvErrMsg(Agent-Conf) strlen(UdmEnvErrMsg(Agent-Conf))) { + RETURN_LONG(1); + } else { + RETURN_LONG(0); + } +#elif UDM_VERSION_ID = 30204 RETURN_LONG(UdmEnvErrCode(Agent-Conf)); #else RETURN_LONG(UdmDBErrorCode(Agent-db)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mnogosearch php_mnogo.c
gluke Sun Nov 24 14:36:46 2002 EDT Modified files: /php4/ext/mnogosearch php_mnogo.c Log: @- A new functions have been added: udm_set_agent_param_ex and udm_get_res_field_ex - A new functions have been added: udm_set_agent_param_ex and udm_get_res_field_ex Index: php4/ext/mnogosearch/php_mnogo.c diff -u php4/ext/mnogosearch/php_mnogo.c:1.66 php4/ext/mnogosearch/php_mnogo.c:1.67 --- php4/ext/mnogosearch/php_mnogo.c:1.66 Sat Sep 28 13:52:06 2002 +++ php4/ext/mnogosearch/php_mnogo.cSun Nov 24 14:36:45 2002 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.66 2002/09/28 17:52:06 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.67 2002/11/24 19:36:45 gluke Exp $ */ /* +--+ @@ -163,6 +163,8 @@ #if UDM_VERSION_ID = 30204 PHP_FE(udm_parse_query_string, NULL) PHP_FE(udm_make_excerpt,NULL) + PHP_FE(udm_set_agent_param_ex, NULL) + PHP_FE(udm_get_res_field_ex,NULL) #endif #endif @@ -1663,6 +1665,104 @@ } RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto int udm_set_agent_param_ex(int agent, string var, string val) + Set mnoGoSearch agent session parameters extended */ +DLEXPORT PHP_FUNCTION(udm_set_agent_param_ex) +{ + pval **yyagent, **yyvar, **yyval; + char *val, *var; + UDM_AGENT * Agent; + + switch(ZEND_NUM_ARGS()){ + + case 3: + if(zend_get_parameters_ex(3,yyagent,yyvar,yyval)==FAILURE){ + RETURN_FALSE; + } + convert_to_string_ex(yyvar); + convert_to_string_ex(yyval); + ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, +mnoGoSearch-agent, le_link); + var = Z_STRVAL_PP(yyvar); + val = Z_STRVAL_PP(yyval); + + break; + + default: + WRONG_PARAM_COUNT; + break; + } + + UdmVarListReplaceStr(Agent-Conf-Vars,var,val); + + if (!strcasecmp(var,LocalCharset)) { + const char * +charset=UdmVarListFindStr(Agent-Conf-Vars,LocalCharset,iso-8859-1); + Agent-Conf-lcs=UdmGetCharSet(charset); + } else if (!strcasecmp(var,BrowserCharset)) { + const char * +charset=UdmVarListFindStr(Agent-Conf-Vars,BrowserCharset,iso-8859-1); + Agent-Conf-bcs=UdmGetCharSet(charset); + } else if (!strcasecmp(var,Synonym)) { + if (UdmSynonymListLoad(Agent-Conf,val)) { + php_error(E_WARNING, %s(): %s, +get_active_function_name(TSRMLS_C),Agent-Conf-errstr); + RETURN_FALSE; + } else UdmSynonymListSort((Agent-Conf-Synonyms)); + } else if (!strcasecmp(var,Stopwordfile)) { + if (UdmStopListLoad(Agent-Conf,val)) { + php_error(E_WARNING, %s(): %s, Agent-Conf-errstr, +get_active_function_name(TSRMLS_C)); + RETURN_FALSE; + } + } else if (!strcasecmp(var,MinWordLen)) { + Agent-Conf-WordParam.min_word_len=atoi(val); + } else if (!strcasecmp(var,MaxWordLen)) { + Agent-Conf-WordParam.max_word_len=atoi(val); + } else if (!strcasecmp(var,VarDir)) { + +snprintf(Agent-Conf-vardir,sizeof(Agent-Conf-vardir)-1,%s%s,val,UDMSLASHSTR); + } + + RETURN_TRUE; +} + +/* {{{ proto string udm_get_res_field_ex(int res, int row, string field) + Fetch mnoGoSearch result field */ +DLEXPORT PHP_FUNCTION(udm_get_res_field_ex) +{ + pval **yyres, **yyrow_num, **yyfield_name; + + UDM_RESULT * Res; + int row; + char *field; + + switch(ZEND_NUM_ARGS()){ + case 3: { + if (zend_get_parameters_ex(3, +yyres,yyrow_num,yyfield_name)==FAILURE){ + RETURN_FALSE; + } + convert_to_string_ex(yyrow_num); + convert_to_string_ex(yyfield_name); + field = Z_STRVAL_PP(yyfield_name); + row = atoi(Z_STRVAL_PP(yyrow_num)); + } + break; + default: + WRONG_PARAM_COUNT; + break; + } + + ZEND_FETCH_RESOURCE(Res, UDM_RESULT *, yyres, -1, mnoGoSearch-Result, +le_res); + if(rowRes-num_rows){ + if (!strcasecmp(field,URL)) { + char*al; + al = (char *)MyRemoveHiLightDup((const char
[PHP-CVS] cvs: php4 /ext/mnogosearch php_mnogo.h
gluke Sun Nov 24 14:39:47 2002 EDT Modified files: /php4/ext/mnogosearch php_mnogo.h Log: - Header file update for new mnogosearch functions Index: php4/ext/mnogosearch/php_mnogo.h diff -u php4/ext/mnogosearch/php_mnogo.h:1.19 php4/ext/mnogosearch/php_mnogo.h:1.20 --- php4/ext/mnogosearch/php_mnogo.h:1.19 Sat Aug 3 04:53:26 2002 +++ php4/ext/mnogosearch/php_mnogo.hSun Nov 24 14:39:46 2002 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php4/ext/mnogosearch/php_mnogo.h,v $ */ -/* $Id: php_mnogo.h,v 1.19 2002/08/03 08:53:26 gluke Exp $ */ +/* $Id: php_mnogo.h,v 1.20 2002/11/24 19:39:46 gluke Exp $ */ /* +--+ @@ -68,6 +68,8 @@ #if UDM_VERSION_ID = 30204 DLEXPORT PHP_FUNCTION(udm_parse_query_string); DLEXPORT PHP_FUNCTION(udm_make_excerpt); +DLEXPORT PHP_FUNCTION(udm_set_agent_param_ex); +DLEXPORT PHP_FUNCTION(udm_get_res_field_ex); #endif #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mnogosearch CREDITS php_mnogo.c
gluke Sat Sep 28 13:52:06 2002 EDT Modified files: /php4/ext/mnogosearch CREDITS php_mnogo.c Log: - Site mirror detection and popularity rank has been added to mnogosearch extension Index: php4/ext/mnogosearch/CREDITS diff -u php4/ext/mnogosearch/CREDITS:1.1 php4/ext/mnogosearch/CREDITS:1.2 --- php4/ext/mnogosearch/CREDITS:1.1Thu Feb 8 05:14:56 2001 +++ php4/ext/mnogosearch/CREDITSSat Sep 28 13:52:06 2002 -1,2 +1,2 mnoGoSearch -Alex Barkov, Ramil Kalimullin, Sergey Kartashoff +Sergey Kartashoff, Alex Barkov, Ramil Kalimullin Index: php4/ext/mnogosearch/php_mnogo.c diff -u php4/ext/mnogosearch/php_mnogo.c:1.65 php4/ext/mnogosearch/php_mnogo.c:1.66 --- php4/ext/mnogosearch/php_mnogo.c:1.65 Sat Sep 7 10:19:51 2002 +++ php4/ext/mnogosearch/php_mnogo.cSat Sep 28 13:52:06 2002 -1,5 +1,5 /* $Source: /usr/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.65 2002/09/07 14:19:51 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.66 2002/09/28 17:52:06 gluke Exp $ */ /* +--+ -52,6 +52,8 #define UDM_FIELD_LANG 14 #define UDM_FIELD_CHARSET 15 #define UDM_FIELD_SITEID 16 +#define UDM_FIELD_POP_RANK 17 +#define UDM_FIELD_ORIGINID 18 /* udm_set_agent_param constants */ #define UDM_PARAM_PAGE_SIZE1 -82,6 +84,7 #define UDM_PARAM_STORED 26 #define UDM_PARAM_GROUPBYSITE 27 #define UDM_PARAM_SITEID 28 +#define UDM_PARAM_DETECT_CLONES29 /* udm_add_search_limit constants */ #define UDM_LIMIT_URL 1 -260,6 +263,8 REGISTER_LONG_CONSTANT(UDM_FIELD_LANG,UDM_FIELD_LANG,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(UDM_FIELD_CHARSET, UDM_FIELD_CHARSET,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(UDM_FIELD_SITEID, UDM_FIELD_SITEID,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(UDM_FIELD_POP_RANK,UDM_FIELD_POP_RANK,CONST_CS | +CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(UDM_FIELD_ORIGINID,UDM_FIELD_ORIGINID,CONST_CS | +CONST_PERSISTENT); /* udm_set_agent_param constants */ REGISTER_LONG_CONSTANT(UDM_PARAM_PAGE_SIZE, UDM_PARAM_PAGE_SIZE,CONST_CS | CONST_PERSISTENT); -310,6 +315,7 REGISTER_LONG_CONSTANT(UDM_PARAM_REMOTE_ADDR, UDM_PARAM_REMOTE_ADDR,CONST_CS | CONST_PERSISTENT); 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); /* udm_add_search_limit constants */ REGISTER_LONG_CONSTANT(UDM_LIMIT_CAT, UDM_LIMIT_CAT,CONST_CS | CONST_PERSISTENT); -450,12 +456,13 UdmVarListReplaceStr(Env-Vars,SyslogFacility,local7); UdmSetLogLevel(Env,0); UdmOpenLog(mnoGoSearch-php,Env,0); - + if(!memcmp(dbaddr,searchd:,8)){ UDM_URL Url; UdmURLParse(Url,dbaddr); UdmDBListAdd(Env-sdcl,Url.hostinfo); } + UdmVarListReplaceStr(Env-Vars,DBAddr,dbaddr); if(UDM_OK!=UdmDBSetAddr(Env-db,dbaddr,UDM_OPEN_MODE_READ)){ sprintf(Env-errstr,Invalid DBAddr: '%s',dbaddr); -463,6 +470,7 php_error(E_WARNING,%s(): Invalid DBAddr, get_active_function_name(TSRMLS_C)); RETURN_FALSE; } + Agent=UdmAgentInit(NULL,Env,0); #elif UDM_VERSION_ID = 30200 Env=UdmAllocEnv(); -1024,7 +1032,7 break; default: - php_error(E_WARNING,%s(): Unknown crosswords mode, get_active_function_name(TSRMLS_C)); + php_error(E_WARNING,%s(): Unknown groupbysite +mode, get_active_function_name(TSRMLS_C)); RETURN_FALSE; break; } -1036,6 +1044,25 break; + case UDM_PARAM_DETECT_CLONES: + switch (atoi(val)){ + case UDM_ENABLED