Automatically calculate the filesystem path of the application and use
[misc/kostenrechnung] / lib / general.php
index fa250f8..278501e 100644 (file)
@@ -21,12 +21,12 @@ function sanitise_filename($file)
   return str_replace('./','x',$file);
 }
 
-function load_mask($name, $prefix = '')
+function load_mask($name)
 {
   global $mask;
 
   $name = sanitise_filename($name);
-  $file = $prefix . 'masks/' . $name . '.php';
+  $file = $_SESSION['sys']['basedir'] . 'masks/' . $name . '.php';
 
   if (!file_exists($file))
     return false;