tpl_editfile = templates/editfile.htm
tpl_copyfile = templates/copyfile.htm
tpl_renamefile = templates/renamefile.htm
+tpl_mkfile = templates/mkfile.htm
+tpl_mkdir = templates/mkdir.htm
tpl_upload = templates/upload.htm
tpl_confirm_rmfile = templates/confirm_rmfile.htm
tpl_confirm_rmdir = templates/confirm_rmdir.htm
err_create_ar = You aren't allowed to create files and directories above the virtual root directory.
err_file_exists = A file or directory called '{FILE}' already exists.
err_exist_edited = The target file '{FILE}' already exists and is edited by someone else.
+err_in_use = The file '{FILE}' is currently edited by someone else.
err_noview = You have not enough permissions to view this file.
err_nocopy = You have not enough permissions to copy this file.
err_dircopy = This editor is not able to copy directories.
# Execute Dev-Editor's commands
#
# Author: Patrick Canterino <patshaping@gmx.net>
-# Last modified: 2004-03-01
+# Last modified: 2004-03-04
#
use strict;
my $virtual = $data->{'virtual'};
my $uselist = $data->{'uselist'};
- return error($config->{'err_editdir'},upper_path($virtual)) if(-d $physical);
- return error_in_use($virtual) if($uselist->in_use($virtual));
- return error($config->{'err_noedit'},upper_path($virtual)) unless(-r $physical && -w $physical);
+ return error($config->{'err_editdir'},upper_path($virtual)) if(-d $physical);
+ return error($config->{'err_in_use'},upper_path($virtual),{FILE => $virtual}) if($uselist->in_use($virtual));
+ return error($config->{'err_noedit'},upper_path($virtual)) unless(-r $physical && -w $physical);
# Check on binary files
my $virtual = $data->{'virtual'};
my $new_physical = $data->{'new_physical'};
- return error_in_use($virtual) if($data->{'uselist'}->in_use($virtual));
+ return error($config->{'err_in_use'},upper_path($virtual),{FILE => $virtual}) if($data->{'uselist'}->in_use($virtual));
if($new_physical)
{
{
# Remove a file
- return error_in_use($virtual) if($data->{'uselist'}->in_use($virtual));
+ return error($config->{'err_in_use'},upper_path($virtual),{FILE => $virtual}) if($data->{'uselist'}->in_use($virtual));
if($data->{'cgi'}->param('confirmed'))
{
# HTML generating routines
#
# Author: Patrick Canterino <patshaping@gmx.net>
-# Last modified: 2004-02-23
+# Last modified: 2004-03-04
#
use strict;
exit;
}
-# error_in_use()
-#
-# Create a message, which shows, that a
-# file is currently in use
-#
-# Params: File, which is in use
-#
-# Return: Formatted message (Scalar Reference)
-
-sub error_in_use($)
-{
- my $file = shift;
-
- return error("The file '".encode_entities($file)."' is currently edited by someone else.",upper_path($file));
-}
-
# it's true, baby ;-)
1;