diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2017-01-01 05:49:02 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-01-01 05:58:42 +0100 |
commit | 00d8709ae8edcac15ca7cfb01ffb60e8165f9132 (patch) | |
tree | 0ecafdaff5d64022bf1d954795fb792d08479421 /includes/pages/admin_import.php | |
parent | b8ebd23f6df8317a2b091335640ddd89de8cc55b (diff) |
Fix relative paths
Diffstat (limited to 'includes/pages/admin_import.php')
-rw-r--r-- | includes/pages/admin_import.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/pages/admin_import.php b/includes/pages/admin_import.php index de33bbe2..0669029d 100644 --- a/includes/pages/admin_import.php +++ b/includes/pages/admin_import.php @@ -8,6 +8,7 @@ function admin_import() { global $rooms_import; global $user; $html = ""; + $import_dir = __DIR__ . '/../../import'; $step = "input"; if (isset($_REQUEST['step']) && in_array($step, [ @@ -18,14 +19,14 @@ function admin_import() { $step = $_REQUEST['step']; } - if ($test_handle = fopen('../import/tmp', 'w')) { + if ($test_handle = @fopen($import_dir . '/tmp', 'w')) { fclose($test_handle); - unlink('../import/tmp'); + @unlink($import_dir . '/tmp'); } else { error(_('Webserver has no write-permission on import directory.')); } - $import_file = '../import/import_' . $user['UID'] . '.xml'; + $import_file = $import_dir . '/import_' . $user['UID'] . '.xml'; $shifttype_id = null; $add_minutes_start = 15; $add_minutes_end = 15; |