Project

General

Profile

« Previous | Next » 

Revision 5201

Added by daigle about 14 years ago

Get the latest revision from metacat when a modify call docid does not have a revision number.

View differences:

register-dataset.cgi
275 275
        }
276 276
        $$templateVars{'siteList'} = \@sortedSites;
277 277
        $$templateVars{'section'} = "Modification Form";
278
        $$templateVars{'docid'} = $FORM::docid;
278
        my ($foundScope, $id, $rev) = split(/\./, $FORM::docid);
279
        if (! $rev) {
280
        	my $metacat = Metacat->new($metacatUrl);
281
        	my $lastRev = $metacat->getLastRevision($FORM::docid);
282
        	$$templateVars{'docid'} = $FORM::docid . "." . $lastRev
283
        } else {
284
        	$$templateVars{'docid'} = $FORM::docid;
285
        }
279 286
        modifyData();
280 287
    }
281 288
    exit();

Also available in: Unified diff