blob: 622a1078efd91d382c3eef5641cd08ff7cd55081 (
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
|
<?php
if (empty($_SERVER["REMOTE_ADDR"])) {
// called from script
echo "Configured domains: \n";
echo shell_exec("cat LocalSettings.php | grep case | sed s/case//g");
echo "\n";
echo "Enter the number of domain of the wiki you want to affect: ";
$handle = fopen ("php://stdin","r");
$domain = fgets($handle);
echo "\n";
} else {
// called from web
$domain = $_SERVER['SERVER_NAME'];
}
switch ($domain) {
case 1: case 'crianzamutua.test':
include(__DIR__ . '/../../etc/global_config-crianzamutua.php');
include(__DIR__ . '/custom/crianzamutua/LocalSettings.php');
break;
case 2: case 'map.globaltapestryofalternatives.test':
include(__DIR__ . '/../../etc/global_config-gta.php');
include(__DIR__ . '/custom/gta/LocalSettings.php');
break;
default:
echo "No config file for this domain.";
break;
}
?>
|