- Timestamp:
- 2013-09-12T10:10:44+12:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/cgiactions/docextractaction.pm
r28251 r28261 358 358 # look up additional args 359 359 my $docid = $self->{'d'}; 360 my $new_docid = $self->{'newd'} || "HASH" . localtime(time); 360 361 my $timestamp = time(); 362 my $new_docid = $self->{'newd'} || "HASH$timestamp"; 361 363 362 364 $self->{'keep-parent-metadata'} = $self->parse_flag("keep-parent-metadata"); … … 373 375 my $doc_filename = &util::filename_cat($archive_dir, $doc_file); 374 376 375 my $new doc_filename = &util::filename_cat($archive_dir, "test.xml");376 377 # # This now stores the full pathname 378 # my $doc_filename = $doc_rec->{'doc-file'}->[0]; 377 my $new_doc_file = $doc_file; 378 $new_doc_file =~ s/doc(-\d+)?.xml$/doc-$timestamp.xml/; 379 380 my $newdoc_filename = &util::filename_cat($archive_dir, $new_doc_file); 379 381 380 382 my $sec_num_hash = $self->sections_as_hash($json_sections_array); … … 390 392 391 393 if ($delete_status == 0) { 394 395 # Existing doc record needs to be reindexed 396 $doc_rec->{'index-status'} = ["I"]; 397 &dbutil::set_infodb_entry($infodbtype, $arcinfo_doc_filename, $docid, $doc_rec); 398 399 # Create doc-record entry for the newly extracted document 400 401 my $new_doc_rec = $doc_rec; 402 #### Need to cut this down to just the assoc files the new document references 403 404 &dbutil::set_infodb_entry($infodbtype, $arcinfo_doc_filename, $new_docid, $new_doc_rec); 405 406 #### Also need to update the archivesinf-src database!!!! 407 # For all the assoc and src files, retrieve record, and add in new_docid 392 408 393 409 my $mess = "document-extract successful: Key[$docid]\n";
Note:
See TracChangeset
for help on using the changeset viewer.