Project

General

Profile

« Previous | Next » 

Revision 2478

Added by sgarg over 19 years ago

Modified the code so that lastid file is created in a skin when lastid file is not found.
Commented out the code which uses AdminDB module and uncommented the test function.

View differences:

register-dataset.cgi
491 491
      debug("Docid is: $docid\n");
492 492
      debug("Lastid is: $id");
493 493
      my $scopeFile = $cfgdir . "/" . $FORM::cfg . "/" . $scope . ".lastid";
494
      open(LASTID, ">$scopeFile") or 
494
      open(LASTID, "+>$scopeFile") or 
495 495
          die "Failed to open lastid file for writing!";
496 496
      print LASTID $id, "\n";
497 497
      close(LASTID);
......
2865 2865
################################################################################
2866 2866
sub getProjectList {
2867 2867
    
2868
    use NCEAS::AdminDB;
2869
    my $admindb = NCEAS::AdminDB->new();
2870
    $admindb->connect($nceas_db, $nceas_db_user, $nceas_db_password);
2871
    my $projects = $admindb->getProjects();
2872
    #my $projects = getTestProjectList();
2868
    #use NCEAS::AdminDB;
2869
    #my $admindb = NCEAS::AdminDB->new();
2870
    #$admindb->connect($nceas_db, $nceas_db_user, $nceas_db_password);
2871
    #my $projects = $admindb->getProjects();
2872
    my $projects = getTestProjectList();
2873 2873
    return $projects;
2874 2874
}
2875 2875

  

Also available in: Unified diff