latest changes requested to remove ID number and date of birth
[namibia] / public / min / index.php
1 <?php
2 /**
3  * Front controller for default Minify implementation
4  *
5  * DO NOT EDIT! Configure this utility via config.php and groupsConfig.php
6  *
7  * @package Minify
8  */
9
10 date_default_timezone_set('Africa/Johannesburg');
11 define('MINIFY_MIN_DIR', dirname(__FILE__));
12
13 // load config
14 require MINIFY_MIN_DIR . '/config.php';
15
16 if (isset($_GET['test'])) {
17     include MINIFY_MIN_DIR . '/config-test.php';
18 }
19
20 require "$min_libPath/Minify/Loader.php";
21 Minify_Loader::register();
22
23 Minify::$uploaderHoursBehind = $min_uploaderHoursBehind;
24 Minify::setCache(
25     isset($min_cachePath) ? $min_cachePath : ''
26     ,$min_cacheFileLocking
27 );
28
29 if ($min_documentRoot) {
30     $_SERVER['DOCUMENT_ROOT'] = $min_documentRoot;
31     Minify::$isDocRootSet = true;
32 }
33
34 $min_serveOptions['minifierOptions']['text/css']['symlinks'] = $min_symlinks;
35 // auto-add targets to allowDirs
36 foreach ($min_symlinks as $uri => $target) {
37     $min_serveOptions['minApp']['allowDirs'][] = $target;
38 }
39
40 if ($min_allowDebugFlag) {
41     $min_serveOptions['debug'] = Minify_DebugDetector::shouldDebugRequest($_COOKIE, $_GET, $_SERVER['REQUEST_URI']);
42 }
43
44 if ($min_errorLogger) {
45     if (true === $min_errorLogger) {
46         $min_errorLogger = FirePHP::getInstance(true);
47     }
48     Minify_Logger::setLogger($min_errorLogger);
49 }
50
51 // check for URI versioning
52 if (preg_match('/&\\d/', $_SERVER['QUERY_STRING'])) {
53     $min_serveOptions['maxAge'] = 31536000;
54 }
55 if (isset($_GET['g'])) {
56     // well need groups config
57     $min_serveOptions['minApp']['groups'] = (require MINIFY_MIN_DIR . '/groupsConfig.php');
58 }
59 if (isset($_GET['f']) || isset($_GET['g'])) {
60     // serve!
61
62     if (! isset($min_serveController)) {
63         $min_serveController = new Minify_Controller_MinApp();
64     }
65     Minify::serve($min_serveController, $min_serveOptions);
66
67 } elseif ($min_enableBuilder) {
68     header('Location: builder/');
69     exit();
70 } else {
71     header("Location: /");
72     exit();
73 }