Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Sep 1999 08:00:02 -0700 (PDT)
From:      Kelly Yancey <kbyanc@posi.net>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/13760: new port: www/udmsearch
Message-ID:  <199909171500.IAA60763@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/13760; it has been noted by GNATS.

From: Kelly Yancey <kbyanc@posi.net>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: ports/13760: new port: www/udmsearch
Date: Fri, 17 Sep 1999 10:52:03 -0400 (EDT)

   Alright, one more time :)
   I found a bug in udmsearch and have submitted a patch to the authors. In
 the meantime, though, I would like to include the patch with the FreeBSD
 port. Attached is the patch. A patches directory will need to be made
 under the udmsearch port directory and the diff below should be saved as
 patch-aa
 
   Thanks,
 
   Kelly
  ~kbyanc@posi.net~
   FreeBSD - The Power To Serve - http://www.freebsd.org/
   Join Team FreeBSD - http://www.posi.net/freebsd/Team-FreeBSD/
 
 
 --- www/morph.php3.in.orig	Fri Sep 17 10:29:12 1999
 +++ www/morph.php3.in		Fri Sep 17 10:33:04 1999
 @@ -159,9 +159,9 @@
      if(strstr($str,'$CL')&&($t=='res')){
  	if($crc<>''){
  		$myurl=$url;$myct=$contype;$mylm=$lastmod;
 -		$query="SELECT url,content_type,last_modified FROM url WHERE crc='$crc' AND rec_id<>'$rec_id'";
 -		if($DEBUG) echo $query,"<BR><HR>";
 -		if(!($res=mysql($mysqldb,$query))) print_error('Query error:'.$query."\n<BR>".mysql_error());
 +		$dbquery="SELECT url,content_type,last_modified FROM url WHERE crc='$crc' AND rec_id<>'$rec_id'";
 +		if($DEBUG) echo $dbquery,"<BR><HR>";
 +		if(!($res=mysql($mysqldb,$dbquery))) print_error('Query error:'.$dbquery."\n<BR>".mysql_error());
  		while($row=mysql_fetch_row($res)){
  		    $url=$row[0];
  		    $contype=$row[1];
 @@ -229,9 +229,9 @@
      print_error('Connection Error');
  
  if(isset($STOPIN)){
 -  $query="SELECT word FROM stopword WHERE word IN ($STOPIN) ORDER BY word";
 -  if($DEBUG) echo $query,"<BR><HR>";
 -  if(!($res=mysql($mysqldb,$query))) print_error('Query Error');
 +  $dbquery="SELECT word FROM stopword WHERE word IN ($STOPIN) ORDER BY word";
 +  if($DEBUG) echo $dbquery,"<BR><HR>";
 +  if(!($res=mysql($mysqldb,$dbquery))) print_error('Query Error');
    $rows=mysql_num_rows($res);
    $nwords=$numwords;
    for($i=0;$i<$rows;$i++){
 @@ -248,7 +248,7 @@
   if($words[$i]!=''){
      $s=$words[$i];
      $len=strlen($s);
 -    $query = "select straight_join
 +    $dbquery = "select straight_join
  	concat(left('$s',$len-length(a.repl)),a.find)
          from affix as a,spell as s
          where right('$s',length(a.repl))=a.repl
 @@ -258,8 +258,8 @@
          and concat(left('$s',$len-length(a.repl)),a.find)=s.word 
          and concat(left('$s',$len-length(a.repl)),a.find) regexp a.mask";
  
 -    if($DEBUG) echo $query,"<BR><HR>";
 -    if(!($res=mysql($mysqldb,$query))) print_error('Query error:'.$query."\n<BR>".mysql_error());
 +    if($DEBUG) echo $dbquery,"<BR><HR>";
 +    if(!($res=mysql($mysqldb,$dbquery))) print_error('Query error:'.$dbquery."\n<BR>".mysql_error());
  
  
      if(isset($RATING)) $RATING.=' + ';
 @@ -267,7 +267,7 @@
      do{
  	$row=mysql_fetch_row($res);
  	    if($row) $s1=$row[0]; else $s1=$s;
 -	    $query="select distinct
 +	    $dbquery="select distinct
      		concat(left(word,length(word)-length(find)),repl) as res 
      		from spell,affix 
  		where spell.word='$s1' 
 @@ -275,10 +275,10 @@
  		and spell.lang=affix.lang 
  		and affix.type='s' 
  		and word regexp mask";
 -	    if($DEBUG) echo $query,"<BR><HR>";
 +	    if($DEBUG) echo $dbquery,"<BR><HR>";
  	    if(isset($WORDIN)) $WORDIN.=',';
  	    $WORDIN.="'$s1'";
 -	    if(!($res1=mysql($mysqldb,$query))) print_error('Query error:'.$query."\n<BR>".mysql_error());
 +	    if(!($res1=mysql($mysqldb,$dbquery))) print_error('Query error:'.$dbquery."\n<BR>".mysql_error());
  	    while($row1=mysql_fetch_row($res1)){
  		$WORDIN.=",'$row1[0]'";
  		$RATING.=",'$row1[0]'";
 @@ -297,16 +297,16 @@
  }
  
  if($ul||$tagstr)
 -    $query="SELECT word,count(*) as c FROM dict,url WHERE word IN 
 +    $dbquery="SELECT word,count(*) as c FROM dict,url WHERE word IN 
      ($WORDIN) AND url.rec_id=dict.url_id AND url.url LIKE '%$ul%' $tagstr
      GROUP BY word ORDER BY word";
  else
 -    $query="SELECT word,count(*) as c FROM dict WHERE word IN
 +    $dbquery="SELECT word,count(*) as c FROM dict WHERE word IN
      ($WORDIN) GROUP BY word ORDER BY word";
  
 -if($DEBUG) echo $query,"<BR><HR>";
 +if($DEBUG) echo $dbquery,"<BR><HR>";
  
 -if(!($res=mysql($mysqldb,$query))) print_error('Query Error');
 +if(!($res=mysql($mysqldb,$dbquery))) print_error('Query Error');
  $rows=mysql_num_rows($res);
  for($i=0;$i<$rows;$i++){
      $row=mysql_fetch_row($res);
 @@ -318,14 +318,14 @@
  
  if($mode=='any') $nwords=0;
  
 -$query="SELECT count(*)as c,dict.url_id
 +$dbquery="SELECT count(*)as c,dict.url_id
      FROM url,dict WHERE url.rec_id=dict.url_id
      AND url.url LIKE '%$ul%' $tagstr
      AND word IN ($WORDIN)
      GROUP BY dict.url_id
      HAVING c>=$nwords";
 -if($DEBUG) echo $query,"<BR><HR>";
 -if(!($res=mysql($mysqldb,$query))) print_error('Query error:'.$query."\n<BR>".mysql_error());
 +if($DEBUG) echo $dbquery,"<BR><HR>";
 +if(!($res=mysql($mysqldb,$dbquery))) print_error('Query error:'.$dbquery."\n<BR>".mysql_error());
  $found=mysql_num_rows($res);
  mysql_free_result($res);
  
 @@ -336,7 +336,7 @@
  }
  
  if($ul||$tagstr)
 -    $query="SELECT url.rec_id,($RATING) as rating,sum(intag) AS q1
 +    $dbquery="SELECT url.rec_id,($RATING) as rating,sum(intag) AS q1
      FROM url,dict
      WHERE url.rec_id=dict.url_id
      AND url.url LIKE '%$ul%' $tagstr
 @@ -344,12 +344,12 @@
      GROUP BY 1 
      ORDER BY rating DESC,q1 DESC LIMIT ".($np*$ps).','.($ps+1);
  else
 -    $query="SELECT url_id,$RATING as rating,sum(intag) AS q1 
 +    $dbquery="SELECT url_id,$RATING as rating,sum(intag) AS q1 
      FROM dict 
      WHERE word IN ($WORDIN) 
      GROUP BY 1 
      ORDER BY rating DESC,q1 DESC LIMIT ".($np*$ps).','.($ps+1);
 -if($DEBUG) echo $query,"<BR><HR>";
 +if($DEBUG) echo $dbquery,"<BR><HR>";
  
  $from=IntVal($np)*IntVal($ps); 
  $from1=IntVal($from)+1;
 @@ -362,8 +362,8 @@
  if (($ps_next>$ps) || ($ps_next<0))
      $ps_next=$ps;
  
 -if (!($res=@mysql($mysqldb,$query)))
 -    print_error('Query error: '.$query."\n<BR>".mysql_error());
 +if (!($res=@mysql($mysqldb,$dbquery)))
 +    print_error('Query error: '.$dbquery."\n<BR>".mysql_error());
  $rows=mysql_numrows($res); 
  $i=0;
  if($rows>$ps){
 @@ -391,12 +391,12 @@
  
  
  if($url_in!=""){
 -  $query="SELECT url,title,text,content_type,last_modified,size,rec_id,description,keywords,crc
 +  $dbquery="SELECT url,title,text,content_type,last_modified,size,rec_id,description,keywords,crc
    FROM url 
    WHERE rec_id IN ($url_in)";
 -  if($DEBUG) echo $query,"<BR><HR>";
 -  if (!($res1=@mysql($mysqldb,$query)))
 -      print_error('Query error: '.$query."\n<BR>".mysql_error());
 +  if($DEBUG) echo $dbquery,"<BR><HR>";
 +  if (!($res1=@mysql($mysqldb,$dbquery)))
 +      print_error('Query error: '.$dbquery."\n<BR>".mysql_error());
  
    mysql_data_seek($res,0);$i=0;
    
 
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909171500.IAA60763>