gluke           Sun Jan 23 10:01:20 2005 EDT

  Modified files:              
    /php-src/ext/mnogosearch    php_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.95&r2=1.96&ty=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.95    Sun 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

Reply via email to