Browse Source

- Udm_Make_Excerpt has been fixed to be compatible with mnogosearch-3.2.10+

migration/unlabaled-1.3.2
Sergey Kartashoff 23 years ago
parent
commit
b296a3bd64
  1. 7
      ext/mnogosearch/php_mnogo.c

7
ext/mnogosearch/php_mnogo.c

@ -1655,11 +1655,13 @@ DLEXPORT PHP_FUNCTION(udm_make_excerpt)
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 @@ DLEXPORT PHP_FUNCTION(udm_get_res_param)
{
size_t wsize=(1+len*15)*sizeof(char);
char *wordinfo = (char*) malloc(wsize);
int corder = -1, ccount = 0;
*wordinfo = '\0';

Loading…
Cancel
Save