-# 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) or return error($config->{'errors'}->{'ul_rm_failed'},$dir,{FILE => $virtual, USELIST => $uselist->{'listfile'}});
-  return devedit_reload({command => 'show', file => $dir});
- }
- else
- {
-  my $tpl = new Template;
-  $tpl->read_file($config->{'templates'}->{'confirm_unlock'});
-
-  $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;
- }
-}
-