]> git.p6c8.net - devedit.git/blobdiff - devedit.pl
There is no need to export error_in_use() any more, because I removed this function.
[devedit.git] / devedit.pl
index a525ec058320a174d45fc15f4b6e31b2fa52287d..b2261ad1e1af384741e3ab89546bff2ea1564499 100644 (file)
@@ -6,7 +6,7 @@
 # Dev-Editor's main program
 #
 # Author:        Patrick Canterino <patshaping@gmx.net>
-# Last modified: 2004-01-16
+# Last modified: 2004-02-23
 #
 
 use strict;
@@ -27,6 +27,7 @@ use constant CONFIGFILE => 'devedit.dat';
 # Read the configuration file
 
 my $config = read_config(CONFIGFILE);
+error_template($config->{'tpl_error'}); # Yes, I'm lazy...
 
 # Read the most important form data
 
@@ -57,14 +58,14 @@ if($newfile ne '')
 
  unless(-d clean_path($config->{'fileroot'}."/".$dir))
  {
-  abort("The directory where you want to create this file or directory doesn't exist.");
+  abort($config->{'err_dir_not_exist'});
  }
 
  # ... and check if the path is above the root directory
 
  unless(($new_physical,$new_virtual) = check_path($config->{'fileroot'},$dir))
  {
-  abort("You aren't allowed to create files and directories above the virtual root directory.");
+  abort($config->{'err_create_ar'});
  }
 
  # Create the physical and the virtual path
@@ -85,7 +86,7 @@ if(-e clean_path($config->{'fileroot'}."/".$file))
                                   lockfile => $config->{'lock_file'},
                                   timeout  => $config->{'lock_timeout'});
 
-  $uselist->lock or abort("Locking of $config->{'uselist_file'} failed. Try it again in a moment. If the problem persists, ask someone to recreate the lock file ($config->{'lock_file'}).");
+  $uselist->lock or abort($config->{'err_lock_failed'},{USELIST => $config->{'uselist_file'}, LOCK_FILE => $config->{'lock_file'}});
   $uselist->load;
 
   # Create a hash with data submitted by user
@@ -105,12 +106,12 @@ if(-e clean_path($config->{'fileroot'}."/".$file))
  }
  else
  {
-  abort("Accessing files and directories above the virtual root directory is forbidden.");
+  abort($config->{'err_above_root'});
  }
 }
 else
 {
- abort("File/directory does not exist.");
+ abort($config->{'err_not_exist'});
 }
 
 #

patrick-canterino.de