fixed #11168 (autocommit map points) and #10888 (editing map points)

This commit is contained in:
Doug Bell 2009-10-26 22:17:58 -05:00
parent 8c3414dca0
commit b24a3f4eb5
3 changed files with 54 additions and 20 deletions

View file

@ -556,8 +556,19 @@ sub www_ajaxEditPointSave {
my $errors = $asset->processAjaxEditForm;
# Commit!
if ($asset->getAutoCommitWorkflowId && $self->hasBeenCommitted) {
$asset->requestAutoCommit;
if ( $asset->getAutoCommitWorkflowId ) {
if ( $self->hasBeenCommitted) {
$asset->requestAutoCommit;
}
else {
# Add mappoint to map's version tag
my $oldTagId = $asset->get('tagId');
$asset->setVersionTag( $self->get('tagId') );
my $oldTag = WebGUI::VersionTag->new( $session, $oldTagId );
if ( $oldTag->getAssetCount <= 0 ) {
$oldTag->rollback;
}
}
}
# Encode entities because we're returning as HTML