[LON-CAPA-cvs] cvs: nsdl / lonsql

www lon-capa-cvs@mail.lon-capa.org
Fri, 25 Nov 2005 21:18:35 -0000


www		Fri Nov 25 16:18:35 2005 EDT

  Modified files:              
    /nsdl	lonsql 
  Log:
  Appears to be working
  
  
Index: nsdl/lonsql
diff -u nsdl/lonsql:1.7 nsdl/lonsql:1.8
--- nsdl/lonsql:1.7	Thu Nov 24 16:34:31 2005
+++ nsdl/lonsql	Fri Nov 25 16:18:35 2005
@@ -3,7 +3,7 @@
 # The LearningOnline Network
 # lonsql - LON TCP-NSDL Query Handler.
 #
-# $Id: lonsql,v 1.7 2005/11/24 21:34:31 www Exp $
+# $Id: lonsql,v 1.8 2005/11/25 21:18:35 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -829,11 +829,18 @@
                 } else {
                    $url='';
                 }
-                $allresults.='&'.
+                if ($url) {
+                   my ($mime)=($url=~/\.(\w+)$/);
+                   $mime=~tr/A-Z/a-z/;
+                   $allresults.='&'.
                     &escape($result{'dc:title'}).','.
                     &escape($result{'dc:creator'}).','.
-                    &escape($url).','.
-                    &escape($result{'dc:subject'}).',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,';
+                    &escape($result{'dc:subject'}).','.
+                    &escape($url).',,,,'.
+                    &escape($result{'dc:description'}).','.
+                    &escape($mime).',seniso,,,,public,nsdl,,,,,,,,,,,,,,,,,,,,,,,,,,,,';
+                }
+                %result=();
 	    } elsif ($token->[1]=~/^dc\:/) {
 		$result{$is}=$cont;
 	    }