Changeset 23767 for main/trunk/greenstone2/perllib
- Timestamp:
- 2011-03-09T15:04:33+13:00 (13 years ago)
- Location:
- main/trunk/greenstone2/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/cgiactions/baseaction.pm
r23755 r23767 104 104 } 105 105 106 106 107 107 if (!defined $action_table->{$action}) { 108 108 my $valid_actions = join(", ", keys %$action_table); … … 144 144 } 145 145 146 146 147 $self->{'action'} = $action; 147 148 $self->{'collect'} = $collect; … … 149 150 $self->{'timestamp'} = $timestamp; 150 151 $self->{'site'} = $site; 151 152 152 153 # Locate and store compulsory arguments 153 154 my $comp_args = $action_table->{$action}->{'compulsory-args'}; … … 171 172 } 172 173 174 175 173 176 # Retrieve infodb-type 174 177 if (defined $collect) { 175 my $inexport = newCGI inexport(ref $self,$collect); 178 179 my $opt_site = $self->{'site'} || ""; 180 181 my $inexport = newCGI inexport(ref $self,$collect,$gsdl_cgi,$opt_site); 176 182 my ($config_filename,$collect_cfg) = $inexport->read_collection_cfg($collect); 177 183 $self->{'infodbtype'} = $collect_cfg->{'infodbtype'}; 184 178 185 } 179 186 187 180 188 return $self; 181 189 } -
main/trunk/greenstone2/perllib/inexport.pm
r23485 r23767 130 130 { 131 131 my $class = shift (@_); 132 my ($mode,$collect ) = @_;132 my ($mode,$collect,$gsdl_cgi,$opt_site) = @_; 133 133 134 134 my $self = { 'xml' => 0, 'mode' => $mode }; 135 135 136 136 $self->{'out'} = STDERR; 137 $self->{'site'} = ""; 138 $self->{'collectdir'} = &util::filename_cat($ENV{'GSDLHOME'},"collect"); 137 138 if (defined $gsdl_cgi) { 139 $self->{'site'} = $opt_site; 140 my $collect_dir = $gsdl_cgi->get_collection_dir($opt_site); 141 $self->{'collectdir'} = $collect_dir; 142 } 143 else { 144 $self->{'site'} = ""; 145 $self->{'collectdir'} = &util::filename_cat($ENV{'GSDLHOME'},"collect"); 146 } 139 147 $self->{'faillog'} = ""; 140 148 … … 159 167 my $site = $self->{'site'}; 160 168 my $out = $self->{'out'}; 161 169 162 170 if (($collection = &colcfg::use_collection($site, $collection, $collectdir)) eq "") { 163 171 &PrintUsage::print_txt_usage($options, "{import.params}");
Note:
See TracChangeset
for help on using the changeset viewer.