cvs: php4 /ext/mnogosearch php_mnogo.c

From: Date: Sun, 13 Apr 2003 17:52:24 +0000
Subject: cvs: php4 /ext/mnogosearch php_mnogo.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-20250@lists.php.net to get a copy of this message
gluke Sun Apr 13 13:52:24 2003 EDT Modified files: /php4/ext/mnogosearch php_mnogo.c Log: - Udm_Make_Excerpt has been fixed to be compatible with mnogosearch-3.2.10+ Index: php4/ext/mnogosearch/php_mnogo.c diff -u php4/ext/mnogosearch/php_mnogo.c:1.71 php4/ext/mnogosearch/php_mnogo.c:1.72 --- php4/ext/mnogosearch/php_mnogo.c:1.71 Sat Jan 18 16:31:06 2003 +++ php4/ext/mnogosearch/php_mnogo.c Sun Apr 13 13:52:24 2003 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.71 2003/01/18 21:31:06 iliaa Exp $ */ +/* $Id: php_mnogo.c,v 1.72 2003/04/13 17:52:24 gluke Exp $ */ /* +----------------------------------------------------------------------+ @@ -1655,11 +1655,13 @@ Excerpt = UdmExcerptDoc(Agent, Res, &(Res->Doc[row]), 256); - if (Excerpt != NULL) { + if ((Excerpt != NULL) && (strlen(Excerpt) > 6)) { char *HlExcerpt = UdmHlConvert(&Res->WWList, Excerpt, Agent->Conf->lcs, Agent->Conf->bcs); - UdmVarListReplaceInt(&(Res->Doc[row].Sections),"ST",1); UdmVarListReplaceStr(&(Res->Doc[row].Sections),"Body",HlExcerpt); UDM_FREE(HlExcerpt); + } + if (Excerpt != NULL && (UdmVarListFindStr(&(Res->Doc[row].Sections), "Z", NULL) == NULL)) { + UdmVarListReplaceInt(&(Res->Doc[row].Sections),"ST",1); UDM_FREE(Excerpt); } else { UdmVarListReplaceInt(&(Res->Doc[row].Sections),"ST",0); @@ -2034,7 +2036,6 @@ { size_t wsize=(1+len*15)*sizeof(char); char *wordinfo = (char*) malloc(wsize); - int corder = -1, ccount = 0; *wordinfo = '\0';

« previous php.cvs (#20250) next »