Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

51 lines (48 sloc) 1.209 kB
#ifdef @UI
UserDB ui database access
UserDB ui crypt 1
UserDB ui time_field last_login
UserDB ui admin 1
UserDB default admin 0
ParseVariables Yes
ActionMap ui_download <<EOR
sub {
my $deliverable = shift;
my $status;
$CGI->{mv_nextpage} =~ s:^ui_download/::;
$CGI->{mv_nextpage} .= $Session->{extension};
if($Tag->if_mm('files', $CGI->{mv_nextpage}) ) {
$Document->header("Content-type: application/octet-stream");
$Document->hot(1);
HTML ( $Tag->file($CGI->{mv_nextpage}) );
$status = 0;
}
else {
$Scratch->{ui_error} = "Not authorized for file $CGI->{mv_nextpage}";
$CGI->{mv_nextpage} = '__UI_BASE__/error';
$status = 1;
}
return $status;
}
EOR
ActionMap ui_edit <<EOR
sub {
my $deliverable = shift;
my $status;
$CGI->{mv_nextpage} =~ s:^ui_download/::;
$CGI->{mv_nextpage} .= $Session->{extension};
if($Tag->if_mm('files', $CGI->{mv_nextpage}) ) {
$Document->header("Content-type: application/octet-stream");
$Document->hot(1);
HTML ( $Tag->file($CGI->{mv_nextpage}) );
$status = 0;
}
else {
$Scratch->{ui_error} = "Not authorized for file $CGI->{mv_nextpage}";
$CGI->{mv_nextpage} = '__UI_BASE__/error';
$status = 1;
}
return $status;
}
EOR
#endif
Jump to Line
Something went wrong with that request. Please try again.