gluke Sun Nov 28 15:03:05 2004 EDT Modified files: /php-src/ext/mnogosearch php_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.94&r2=1.95&ty=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.94 Mon 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