Fix relative paths
This commit is contained in:
parent
b8ebd23f6d
commit
00d8709ae8
|
@ -8,6 +8,7 @@ function admin_import() {
|
||||||
global $rooms_import;
|
global $rooms_import;
|
||||||
global $user;
|
global $user;
|
||||||
$html = "";
|
$html = "";
|
||||||
|
$import_dir = __DIR__ . '/../../import';
|
||||||
|
|
||||||
$step = "input";
|
$step = "input";
|
||||||
if (isset($_REQUEST['step']) && in_array($step, [
|
if (isset($_REQUEST['step']) && in_array($step, [
|
||||||
|
@ -18,14 +19,14 @@ function admin_import() {
|
||||||
$step = $_REQUEST['step'];
|
$step = $_REQUEST['step'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($test_handle = fopen('../import/tmp', 'w')) {
|
if ($test_handle = @fopen($import_dir . '/tmp', 'w')) {
|
||||||
fclose($test_handle);
|
fclose($test_handle);
|
||||||
unlink('../import/tmp');
|
@unlink($import_dir . '/tmp');
|
||||||
} else {
|
} else {
|
||||||
error(_('Webserver has no write-permission on import directory.'));
|
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;
|
$shifttype_id = null;
|
||||||
$add_minutes_start = 15;
|
$add_minutes_start = 15;
|
||||||
$add_minutes_end = 15;
|
$add_minutes_end = 15;
|
||||||
|
|
|
@ -4,6 +4,6 @@ function credits_title() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function guest_credits() {
|
function guest_credits() {
|
||||||
return template_render('../templates/guest_credits.html', []);
|
return template_render(__DIR__ . '/../../templates/guest_credits.html', []);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
|
@ -154,7 +154,7 @@ function view_user_shifts() {
|
||||||
return page([
|
return page([
|
||||||
div('col-md-12', [
|
div('col-md-12', [
|
||||||
msg(),
|
msg(),
|
||||||
template_render('../templates/user_shifts.html', [
|
template_render(__DIR__ . '/../../templates/user_shifts.html', [
|
||||||
'title' => shifts_title(),
|
'title' => shifts_title(),
|
||||||
'room_select' => make_select($rooms, $shiftsFilter->getRooms(), "rooms", _("Rooms")),
|
'room_select' => make_select($rooms, $shiftsFilter->getRooms(), "rooms", _("Rooms")),
|
||||||
'start_select' => html_select_key("start_day", "start_day", array_combine($days, $days), $start_day),
|
'start_select' => html_select_key("start_day", "start_day", array_combine($days, $days), $start_day),
|
||||||
|
|
|
@ -162,7 +162,7 @@ if (isset($_REQUEST['p']) && preg_match("/^[a-z0-9_]*$/i", $_REQUEST['p']) && (i
|
||||||
|
|
||||||
$event_config = EventConfig();
|
$event_config = EventConfig();
|
||||||
|
|
||||||
echo template_render('../templates/layout.html', [
|
echo template_render(__DIR__ . '/../templates/layout.html', [
|
||||||
'theme' => isset($user) ? $user['color'] : $default_theme,
|
'theme' => isset($user) ? $user['color'] : $default_theme,
|
||||||
'title' => $title,
|
'title' => $title,
|
||||||
'atom_link' => ($page == 'news' || $page == 'user_meetings') ? '<link href="' . page_link_to('atom') . (($page == 'user_meetings') ? '&meetings=1' : '') . '&key=' . $user['api_key'] . '" type="application/atom+xml" rel="alternate" title="Atom Feed">' : '',
|
'atom_link' => ($page == 'news' || $page == 'user_meetings') ? '<link href="' . page_link_to('atom') . (($page == 'user_meetings') ? '&meetings=1' : '') . '&key=' . $user['api_key'] . '" type="application/atom+xml" rel="alternate" title="Atom Feed">' : '',
|
||||||
|
|
Loading…
Reference in New Issue