- $tpl->fillin("FILE",$virtual);
- $tpl->fillin("DIR",$dir);
- $tpl->fillin("URL",equal_url($config->{'httproot'},$virtual));
- $tpl->fillin("SCRIPT",$script);
-
- my $output = header(-type => "text/html");
- $output .= $tpl->get_template;
-
- return \$output;
- }
-}
-
-# exec_unlock()
-#
-# Remove a file from the list of used files and
-# return to directory view
-#
-# Params: 1. Reference to user input hash
-# 2. Reference to config hash
-#
-# Return: Output of the command (Scalar Reference)
-
-sub exec_unlock($$)
-{
- my ($data,$config) = @_;
- my $virtual = $data->{'virtual'};
- my $uselist = $data->{'uselist'};
- my $dir = upper_path($virtual);
-
- return devedit_reload({command => 'show', file => $dir}) if($uselist->unused($virtual));
-
- if($data->{'cgi'}->param('confirmed'))
- {
- file_unlock($uselist,$virtual);
- return devedit_reload({command => 'show', file => $dir});
- }
- else
- {
- my $tpl = new Template;
- $tpl->read_file($config->{'templates'}->{'confirm_unlock'});
+ $tpl->fillin('FILE',encode_html($virtual));
+ $tpl->fillin('FILE_URL',escape($virtual));
+ $tpl->fillin('DIR',encode_html($dir));
+ $tpl->fillin('DIR_URL',escape($dir));
+ $tpl->fillin('URL',equal_url($config->{'httproot'},encode_html($virtual)));
+ $tpl->fillin('SCRIPT',$script);