- Timestamp:
- 2013-05-07T21:08:06+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/cgiactions/metadataaction.pm
r27313 r27314 193 193 ## my $collect_dir = &util::filename_cat($gsdlhome, "collect"); 194 194 195 # Make sure the collection isn't locked by someone else196 $self->lock_collection($username, $collect); 195 # No locking collection when getting metadata, only when setting it 196 # $self->lock_collection($username, $collect); # Make sure the collection isn't locked by someone else 197 197 198 198 # look up additional args … … 236 236 237 237 # Release the lock once it is done 238 $self->unlock_collection($username, $collect);238 # $self->unlock_collection($username, $collect); 239 239 } 240 240 … … 388 388 my $gsdlhome = $self->{'gsdlhome'}; 389 389 390 # Authenticate user if it is enabled391 if ($baseaction::authentication_enabled) {392 # Ensure the user is allowed to edit this collection393 $self->authenticate_user($username, $collect); #&authenticate_user($gsdl_cgi, $username, $collect);394 }395 396 390 # Obtain the collect dir 397 391 my $site = $self->{'site'}; 398 392 my $collect_dir = $gsdl_cgi->get_collection_dir($site); 399 393 ##my $collect_dir = &util::filename_cat($gsdlhome, "collect"); 400 401 # Make sure the collection isn't locked by someone else402 $self->lock_collection($username, $collect);403 394 404 395 # look up additional args … … 433 424 $gsdl_cgi->generate_ok_message("$metavalue"); 434 425 435 # Release the lock once it is done436 $self->unlock_collection($username, $collect);437 426 } 438 427 … … 447 436 my $gsdlhome = $self->{'gsdlhome'}; 448 437 449 # Authenticate user if it is enabled450 if ($baseaction::authentication_enabled) {451 # Ensure the user is allowed to edit this collection452 $self->authenticate_user($username, $collect); #&authenticate_user($gsdl_cgi, $username, $collect);453 }454 455 438 # Obtain the collect dir 456 439 my $site = $self->{'site'}; 457 440 my $collect_dir = $gsdl_cgi->get_collection_dir($site); 458 441 ##my $collect_dir = &util::filename_cat($gsdlhome, "collect"); 459 460 # Make sure the collection isn't locked by someone else461 $self->lock_collection($username, $collect);462 442 463 443 # look up additional args … … 494 474 $gsdl_cgi->generate_ok_message($self->get_metadata_from_metadata_xml($gsdl_cgi, $metadata_xml_filename, $metaname, $metapos, $import_tailname)); 495 475 496 # Release the lock once it is done497 $self->unlock_collection($username, $collect);498 476 } 499 477 … … 582 560 my $infodbtype = $self->{'infodbtype'}; 583 561 584 # Authenticate user if it is enabled585 if ($baseaction::authentication_enabled) {586 # Ensure the user is allowed to edit this collection587 $self->authenticate_user($username, $collect); #&authenticate_user($gsdl_cgi, $username, $collect);588 }589 590 562 # Obtain the collect dir 591 563 my $site = $self->{'site'}; … … 594 566 my $archive_dir = &util::filename_cat($collect_dir, $collect, "archives"); 595 567 596 # Make sure the collection isn't locked by someone else597 $self->lock_collection($username, $collect);598 599 568 # look up additional args 600 569 my ($docid, $docid_secnum) = ($self->{'d'} =~ m/^(.*?)(\..*)?$/); … … 613 582 $gsdl_cgi->generate_ok_message($self->get_metadata_from_archive_xml($gsdl_cgi, &util::filename_cat($archive_dir, $doc_filename), $metaname, $metapos, $docid_secnum)); 614 583 615 # Release the lock once it is done616 $self->unlock_collection($username, $collect);617 584 } 618 585
Note:
See TracChangeset
for help on using the changeset viewer.