aboutsummaryrefslogtreecommitdiff
path: root/public/web_migrate.php
blob: 0ee4de554638e7dc40240a64ef450fcc407521f0 (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
<?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';

page_open([
    'sess' => 'Seminar_Session',
    'auth' => 'Seminar_Auth',
    'perm' => 'Seminar_Perm',
    'user' => 'Seminar_User',
]);

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}");