blob: 4f2102a8eb0f0e2707f4a30a385e89d2269c2ec2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<?php
# Lifter002: TODO
# Lifter007: TODO
# Lifter003: TODO
# Lifter010: TODO
/*
* web_migrate.php - web-based migrator for Stud.IP
* Copyright (C) 2007 Elmar Ludwig
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*/
require __DIR__ . '/../lib/bootstrap.php';
sess()->start();
if (!auth()->start()) {
$_SESSION['redirect_after_login'] = Request::url();
sess()->save();
header('Location: ' . URLHelper::getURL('dispatch.php/login'));
die();
}
URLHelper::setBaseUrl($GLOBALS['ABSOLUTE_URI_STUDIP']);
if (empty($_SESSION['_language'])) {
$_SESSION['_language'] = get_accepted_languages();
}
$_language_path = init_i18n($_SESSION['_language']);
$GLOBALS['template_factory'] = new Flexi\Factory('../templates/');
# get plugin class from request
$dispatch_to = Request::pathInfo() ?: '';
$dispatcher = app(\Trails\Dispatcher::class);
$dispatcher->trails_uri = $_SERVER['SCRIPT_NAME'];
$dispatcher->dispatch("web_migrate/{$dispatch_to}");
|