Changeset 19617


Ignore:
Timestamp:
05/27/09 13:56:41 (12 years ago)
Author:
kjdon
Message:

use new util::tidy_up_oid instead of fiddling with it directly

Location:
gsdl/trunk/perllib
Files:
2 edited

Legend:

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

    r19494 r19617  
    300300        if (defined $OID) {
    301301            $OID = 'J'.&File::Basename::basename($OID);
    302             $OID =~ s/\.//; #remove any periods
     302            $OID = &util::tidy_up_oid($OID);
    303303        } else {
    304304            print STDERR "Failed to find base for filename ($filename)...generating hash id\n";
     
    314314        if (defined $identifier && $identifier ne "") {
    315315        $OID = $identifier;
    316         if ($OID =~ /\./) {
    317             print STDERR "Warning, assigned identifier $identifier contains periods (.), removing them\n";
    318             $OID =~ s/\.//g; #remove any periods
    319         }
    320         if ($OID =~ /^[\d]*$/) {
    321             print STDERR "Warning, assigned identifier $identifier contains only digits. Prepending 'D'.\n";
    322             $OID = "D" . $OID;
    323         }       
     316        $OID = &util::tidy_up_oid($OID);
    324317        } else {
    325318        # need a hash id
  • gsdl/trunk/perllib/plugins/SplitTextFile.pm

    r19493 r19617  
    306306    if (defined $identifier && $identifier ne "") {
    307307        $full_id = $identifier;
    308         $full_id =~ s/\.//g; #remove any periods
    309         if ($full_id =~ /^[\d]*$/) {
    310         $full_id = "D" . $full_id;
    311         print STDERR "OID only contains numbers, adding a D\n";
    312         }
     308        $full_id = &util::tidy_up_oid($full_id);
    313309    }
    314310    }
Note: See TracChangeset for help on using the changeset viewer.