> On Thu, 2 May 2002, Alexander Barkov wrote:
>
> > But this does not work, the $(DID) expands to empty string, has someone
> > tried this?
> >
> > What version of mnogosearch do you use?
Ok. here is the patch.
--
Krzysztof Drewicz
[EMAIL PROTECTED]
Unfortunately, no one can be told what the Mac is like.
You have to see it for yourself.
From [EMAIL PROTECTED] Sat May 4 17:11:15 2002
Date: Sat, 04 May 2002 16:30:23 +0200
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: patchnamnogo
--- ./sql.c Sat Nov 24 16:42:52 2001
+++ ../../a/mnogosearch-3.2.3/src/sql.c Sat May 4 16:13:22 2002
@@ -4942,7 +4942,7 @@
sprintf(UDM_STREND(instr),"%s%d",i?",":"",Res->Doc[i].url_id);
}
- snprintf(qbuf,sizeof(qbuf),"SELECT
rec_id,url,content_type,last_mod_time,title,txt,docsize,next_index_time,referrer,keywords,description,crc32,tag,category,lang,charset
FROM url WHERE rec_id IN (%s) ORDER BY rec_id",instr);
+ snprintf(qbuf,sizeof(qbuf),"SELECT
+rec_id,url,content_type,last_mod_time,title,txt,docsize,next_index_time,referrer,keywords,description,crc32,tag,category,lang,charset,msg_id
+ FROM url WHERE rec_id IN (%s) ORDER BY rec_id",instr);
sqlres=UdmSQLQuery(query->db,qbuf);
if(UdmDBErrorCode(query->db)){
@@ -4968,6 +4968,7 @@
Res->Doc[j].category=strdup(UdmSQLValue(sqlres,i,13));
Res->Doc[j].lang=strdup(UdmSQLValue(sqlres,i,14));
Res->Doc[j].charset=strdup(UdmSQLValue(sqlres,i,15));
+
+Res->Doc[j].message_id=strdup(UdmSQLValue(sqlres,i,16));
break;
}
}
--- ./search.c Sat Nov 24 12:39:01 2001
+++ ../../a/mnogosearch-3.2.3/src/search.c Sat May 4 16:29:34 2002
@@ -287,6 +287,7 @@
if(!qw[0]){
UdmTemplatePrint(Agent,stdout,NULL,Env->vars,tmpl,T_NOQUERY);
}else{
+ UdmAddStrVar(Env->vars,"qw",qw,UDM_VARSRC_GLOBAL);
if((Res=UdmFind(Agent,qw))){
char search_time[100];
size_t len=strlen(Res->wordinfo);
@@ -429,6 +430,7 @@
UdmReplaceStrVar(Env->vars,"DC",Doc->content_type,UDM_VARSRC_GLOBAL);
UdmReplaceStrVar(Env->vars,"DD",Doc->description,UDM_VARSRC_GLOBAL);
UdmReplaceStrVar(Env->vars,"DK",Doc->keywords,UDM_VARSRC_GLOBAL);
+
+UdmReplaceStrVar(Env->vars,"ID",Doc->message_id,UDM_VARSRC_GLOBAL);
UdmReplaceIntVar(Env->vars,"DR",Doc->rating,UDM_VARSRC_GLOBAL);
UdmReplaceIntVar(Env->vars,"DS",Doc->size,UDM_VARSRC_GLOBAL);
UdmReplaceIntVar(Env->vars,"DN",Doc->order,UDM_VARSRC_GLOBAL);