Ignore:
Timestamp:
2010-01-22T15:57:09+13:00 (14 years ago)
Author:
mdewsnip
Message:

Changed import.pl and export.pl so instead of explicitly using "archiveinf-doc.gdb" or "archiveinf-src.gdb" they use the dbutil::get_infodb_file_path() function... you know, the one that should have been used originally? In preparation for making it possible to use something other than GDBM, and part of making the code less GDBM-specific.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/export.pl

    r21580 r21581  
    525525    # the plugouts should be doing this!!
    526526##  $expinfo_doc_filename = &util::filename_cat ($exportdir, "export.inf");
    527     $expinfo_doc_filename = &util::filename_cat ($exportdir,"archiveinf-doc" );
    528     &util::rename_gdbm_file($expinfo_doc_filename); # ensures gdb in case we have an existing legacy ldb one - can this happen?
    529     $expinfo_doc_filename .= ".gdb";
    530    
    531     $expinfo_src_filename = &util::filename_cat ($exportdir,"archiveinf-src" );
    532     &util::rename_gdbm_file($expinfo_src_filename); # ensures gdb in case we have an existing legacy ldb one - can this happen?
    533     $expinfo_src_filename .= ".gdb";
    534 
     527
     528    # BACKWARDS COMPATIBILITY: Just in case there are old .ldb/.bdb files (won't do anything for other infodbtypes)
     529    &util::rename_gdbm_file(&util::filename_cat($exportdir, "archiveinf-doc"));
     530    &util::rename_gdbm_file(&util::filename_cat($exportdir, "archiveinf-src"));
     531
     532    $expinfo_doc_filename = &dbutil::get_infodb_file_path($collectcfg->{'infodbtype'}, "archiveinf-doc", $exportdir);
     533    $expinfo_src_filename = &dbutil::get_infodb_file_path($collectcfg->{'infodbtype'}, "archiveinf-src", $exportdir);
    535534       
    536535    $export_info = new arcinfo($collectcfg->{'infodbtype'});
Note: See TracChangeset for help on using the changeset viewer.