From 00d8709ae8edcac15ca7cfb01ffb60e8165f9132 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 1 Jan 2017 05:49:02 +0100 Subject: Fix relative paths --- includes/pages/admin_import.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'includes/pages/admin_import.php') 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; -- cgit v1.2.3-54-g00ecf