Ignore:
Timestamp:
1998-12-21T15:15:17+13:00 (25 years ago)
Author:
rjmcnab
Message:

Fixed a bug in the sorting and then removed the sorting as its too
slow on large collections (and we don't need it any more).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/ArcPlug.pm

    r70 r87  
    4646
    4747    # process each file
    48     foreach $subfile (sort alphabetically @$file_list) {
     48    foreach $subfile (@$file_list) {
    4949        # note: metadata is not carried on to the next level
    5050        my $tmp = &util::filename_cat ($file, $subfile->[0]);
     
    5555    # all books have been processed so need to output classifications
    5656    # to infodb - note that at present you have to import before building
    57     if ($processor->{'mode'} eq 'infodb') {
     57    if (defined $processor->{'mode'} && $processor->{'mode'} eq 'infodb') {
    5858        print STDERR "ArcPlug: Adding classifications to infodb\n";
    5959        $processor->process('classifications');
     
    7373    open (B, &util::filename_cat($base_dir, $file, $b->[0])) ||
    7474    die "couldn't open " . &util::filename_cat($base_dir, $file, $b->[0]) . "\n";
    75     my ($atitle, $btitle);
     75    my $atitle = "untitled";
     76    my $btitle = "untitled";
    7677    my $line = "";
    77     while (defined ($line .= <A>)) {
    78     if ($line =~ /Title=\"([^\"]*)\"/) {$atitle = $1; last;}
     78    my $text = "";
     79    while (defined ($line = <A>)) {
     80    $text .= $line;
     81    if ($text =~ /Title=\"([^\"]*)\"/) {$atitle = $1; last;}
    7982    }
    80     $line = "";
    81     while (defined ($line .= <B>)) {
    82     if ($line =~ /Title=\"([^\"]*)\"/) {$btitle = $1; last;}
     83    $text = "";
     84    while (defined ($line = <B>)) {
     85    $text .= $line;
     86    if ($text =~ /Title=\"([^\"]*)\"/) {$btitle = $1; last;}
    8387    }
    8488    close A;
Note: See TracChangeset for help on using the changeset viewer.