Changeset 15695

Show
Ignore:
Timestamp:
26.05.2008 11:55:54 (11 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Starting to tidy up the infodb() function in preparation for separating out the GDBM stuff.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/basebuildproc.pm

    r15688 r15695  
    384384    $self->{'doc_mdprefix_fields'} = {}; 
    385385 
    386     while (defined $section) { 
     386    while (defined $section) 
     387    { 
     388    my $section_OID = $doc_OID; 
     389    if ($section ne "") 
     390    { 
     391        $section_OID = $doc_OID . "." . $section; 
     392    } 
     393 
    387394    # update a few statistics 
    388395    $self->{'num_bytes'} += $doc_obj->get_text_length ($section); 
     
    390397 
    391398    # output the section name 
    392     if ($section eq "") { print $handle "[$doc_OID]\n"; } 
    393     else { print $handle "[$doc_OID.$section]\n"; } 
     399    print $handle "[$section_OID]\n"; 
    394400 
    395401    # output the fact that this document is a document (unless doctype 
     
    438444        if ($field =~ /^URL$/i) { 
    439445                    $url .= "[$value]\n"; 
    440                     if ($section eq "") {$url .= "<section>$doc_OID\n";} 
    441                     else {$url .= "<section>$doc_OID.$section\n";} 
     446            $url .= "<section>$section_OID\n"; 
    442447                    $url .= '-' x 70 . "\n"; 
    443448        } 
     
    511516            print $handle "\".$child"; 
    512517            } 
    513 #       if ($child eq "") { print $handle "$doc_OID"; } 
    514 #       elsif ($section eq "") { print $handle "$doc_OID.$child"; } 
    515 #       else { print $handle "$doc_OID.$section.$child"; } 
    516518        } 
    517519        print $handle "\n"; 
     
    532534    else { 
    533535        print $handle "[$self->{'num_sections'}]\n"; 
    534         if ($section eq "") { print $handle "<section>$doc_OID\n"; } 
    535         else { print $handle "<section>$doc_OID.$section\n"; } 
     536        print $handle "<section>$section_OID\n"; 
    536537    } 
    537538    print $handle '-' x 70, "\n";