Diff for /loncom/interface/lonsearchcat.pm between versions 1.169 and 1.170

version 1.169, 2003/03/10 14:20:07 version 1.170, 2003/03/10 21:22:36
Line 1898  the following format: Line 1898  the following format:
   
 =cut  =cut
   
 ##  #####################################################################
 ## Restrictions:  #####################################################################
 ##    columns of type 'text' and 'blob' cannot have defaults.  
 ##    columns of type 'enum' cannot be used for FULLTEXT.  my @Datatypes = 
 ##      ( { name => 'id', 
 my @DataOrder = qw/id title author subject url keywords version notes          type => 'MEDIUMINT',
     abstract mime lang owner copyright creationdate lastrevisiondate hostname/;          restrictions => 'UNSIGNED NOT NULL',
           primary_key  => 'yes',
 my %Datatypes =           auto_inc     => 'yes' },
     ( id        =>{ type         => 'MEDIUMINT',        { name => 'title',     type=>'TEXT'},
                     restrictions => 'UNSIGNED NOT NULL',        { name => 'author',    type=>'TEXT'},
                     primary_key  => 'yes',        { name => 'subject',   type=>'TEXT'},
                     auto_inc     => 'yes'        { name => 'url',       type=>'TEXT', restrictions => 'NOT NULL' },
                     },        { name => 'keywords',  type=>'TEXT'},
       title     =>{ type=>'TEXT'},        { name => 'version',   type=>'TEXT'},
       author    =>{ type=>'TEXT'},        { name => 'notes',     type=>'TEXT'},
       subject   =>{ type=>'TEXT'},        { name => 'abstract',  type=>'TEXT'},
       url       =>{ type=>'TEXT',        { name => 'mime',      type=>'TEXT'},
                     restrictions => 'NOT NULL' },        { name => 'lang',      type=>'TEXT'},
       keywords  =>{ type=>'TEXT'},        { name => 'owner',     type=>'TEXT'},
       version   =>{ type=>'TEXT'},        { name => 'copyright', type=>'TEXT'},
       notes     =>{ type=>'TEXT'},        { name => 'hostname',  type=>'TEXT'},
       abstract  =>{ type=>'TEXT'},  
       mime      =>{ type=>'TEXT'},  
       lang      =>{ type=>'TEXT'},  
       owner     =>{ type=>'TEXT'},  
       copyright =>{ type=>'TEXT'},  
       hostname  =>{ type=>'TEXT'},  
       #--------------------------------------------------        #--------------------------------------------------
       creationdate     =>{ type=>'DATETIME'},        { name => 'creationdate',     type=>'DATETIME'},
       lastrevisiondate =>{ type=>'DATETIME'},        { name => 'lastrevisiondate', type=>'DATETIME'},
       #--------------------------------------------------        #--------------------------------------------------
       );        );
   
Line 1956  Returns: the identifier of the table on Line 1950  Returns: the identifier of the table on
 ######################################################################  ######################################################################
 sub create_results_table {  sub create_results_table {
     my $table = &Apache::lonmysql::create_table      my $table = &Apache::lonmysql::create_table
         ( { columns => \%Datatypes,          ( { columns => \@Datatypes,
             column_order => \@DataOrder,  
             fullindex => \@Fullindicies,              fullindex => \@Fullindicies,
         } );          } );
     if (defined($table)) {      if (defined($table)) {
Line 2484  sub parse_row { Line 2477  sub parse_row {
     my @Row = @_;      my @Row = @_;
     my %Fields;      my %Fields;
     for (my $i=0;$i<=$#Row;$i++) {      for (my $i=0;$i<=$#Row;$i++) {
         $Fields{$DataOrder[$i]}=&Apache::lonnet::unescape($Row[$i]);          $Fields{$Datatypes[$i]->{'name'}}=&Apache::lonnet::unescape($Row[$i]);
     }      }
     $Fields{'language'} =       $Fields{'language'} = 
         &Apache::loncommon::languagedescription($Fields{'lang'});          &Apache::loncommon::languagedescription($Fields{'lang'});

Removed from v.1.169  
changed lines
  Added in v.1.170


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>