3 * Front controller for default Minify implementation
5 * DO NOT EDIT! Configure this utility via config.php and groupsConfig.php
10 define('MINIFY_MIN_DIR', dirname(__FILE__));
13 require MINIFY_MIN_DIR . '/config.php';
16 set_include_path($min_libPath . PATH_SEPARATOR . get_include_path());
20 Minify::$uploaderHoursBehind = $min_uploaderHoursBehind;
22 isset($min_cachePath) ? $min_cachePath : ''
23 ,$min_cacheFileLocking
26 if ($min_documentRoot) {
27 $_SERVER['DOCUMENT_ROOT'] = $min_documentRoot;
28 } elseif (0 === stripos(PHP_OS, 'win')) {
29 Minify::setDocRoot(); // IIS may need help
32 $min_serveOptions['minifierOptions']['text/css']['symlinks'] = $min_symlinks;
34 if ($min_allowDebugFlag && isset($_GET['debug'])) {
35 $min_serveOptions['debug'] = true;
38 if ($min_errorLogger) {
39 require_once 'Minify/Logger.php';
40 if (true === $min_errorLogger) {
41 require_once 'FirePHP.php';
42 Minify_Logger::setLogger(FirePHP::getInstance(true));
44 Minify_Logger::setLogger($min_errorLogger);
48 // check for URI versioning
49 if (preg_match('/&\\d/', $_SERVER['QUERY_STRING'])) {
50 $min_serveOptions['maxAge'] = 31536000;
52 if (isset($_GET['g'])) {
53 // well need groups config
54 $min_serveOptions['minApp']['groups'] = (require MINIFY_MIN_DIR . '/groupsConfig.php');
56 if (isset($_GET['f']) || isset($_GET['g'])) {
58 Minify::serve('MinApp', $min_serveOptions);
60 } elseif ($min_enableBuilder) {
61 header('Location: builder/');
64 header("Location: /");