Revision 1993
Added by Matt Jones almost 21 years ago
src/perl/register-dataset.cgi | ||
---|---|---|
2683 | 2683 |
################################################################################ |
2684 | 2684 |
sub getProjectList { |
2685 | 2685 |
|
2686 |
#use NCEAS::AdminDB; |
|
2686 |
use NCEAS::AdminDB; |
|
2687 |
my $admindb = NCEAS::AdminDB->new(); |
|
2688 |
$admindb->connect($nceas_db, $nceas_db_user, $nceas_db_password); |
|
2689 |
my $projects = $admindb->getProjects(); |
|
2690 |
#my $projects = getTestProjectList(); |
|
2691 |
return $projects; |
|
2692 |
} |
|
2687 | 2693 |
|
2688 |
#my $admindb = NCEAS::AdminDB->new(); |
|
2689 |
#$admindb->connect($nceas_db, $nceas_db_user, $nceas_db_password); |
|
2690 |
#my $projects = $admindb->getProjects(); |
|
2691 |
|
|
2694 |
################################################################################ |
|
2695 |
# |
|
2696 |
# get a test list of projects for use only in testing where the NCEAS |
|
2697 |
# admin db is not available. |
|
2698 |
# |
|
2699 |
################################################################################ |
|
2700 |
sub getTestProjectList { |
|
2692 | 2701 |
# This block is for testing only! Remove for production use |
2693 | 2702 |
my @row1; |
2694 | 2703 |
$row1[0] = 6000; $row1[1] = 'Andelman'; $row1[2] = 'Sandy'; $row1[3] = 'The very long and windy path to an apparent ecological conclusion: statistics lie'; |
... | ... | |
2713 | 2722 |
$projects[5] = \@row6; |
2714 | 2723 |
$projects[6] = \@row7; |
2715 | 2724 |
return \@projects; |
2716 |
|
|
2717 |
#return $projects; |
|
2718 | 2725 |
} |
Also available in: Unified diff
Changes to re-enable the nceas admindb access for the production install.