forked from MythTV/mythweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mythweb.php
39 lines (34 loc) · 999 Bytes
/
mythweb.php
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
<?php
/**
* The main brain script for all of MythWeb.
*
* @url $URL$
* @date $Date$
* @version $Revision$
* @author $Author$
* @license GPL
*
* @package MythWeb
*
/**/
// Add a custom include path?
if (!empty($_SERVER['include_path']) && $_SERVER['include_path'] != '.')
ini_set('include_path', $_SERVER['include_path'].PATH_SEPARATOR.ini_get('include_path'));
// Init
require_once 'includes/init.php';
// Standard module? Pass along the
if ($Modules[$Path[0]]) {
// Add the current module directory to our search path, so modules can
// define includes, etc.
ini_set('include_path', ini_get('include_path').':'.modules_path.'/'.$Path[0]);
// Load the module handler
require_once 'handler.php';
}
elseif (!empty($Path[0]) && preg_match('/\w/', $Path[0])) {
tailored_error('unknown_module');
}
else {
require_once 'modules/welcome.php';
}
// Exit gracefully
exit;