Commit add54143 authored by Leigh Stoller's avatar Leigh Stoller

Allow version number when getting profile source.

parent 8d22fd18
......@@ -36,6 +36,7 @@ function SPITERROR($code, $msg)
# No current user needed, this gets source code for public profiles.
#
$optargs = OptionalPageArguments("profile", PAGEARG_STRING,
"version", PAGEARG_INTEGER,
"project", PAGEARG_PROJECT);
if (!isset($profile)) {
......@@ -45,7 +46,10 @@ if (IsValidUUID($profile)) {
$profile = Profile::Lookup($profile);
}
elseif (isset($project)) {
$profile = Profile::LookupByName($project, $profile);
if (!isset($version)) {
$version = null;
}
$profile = Profile::LookupByName($project, $profile, $version);
}
else {
SPITERROR(401, "Must provide a project and profile name");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment