]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/Minify/extlib/minify/min/index.php
Merge activity plugin into mainline
[quix0rs-gnu-social.git] / plugins / Minify / extlib / minify / 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 define('MINIFY_MIN_DIR', dirname(__FILE__));
11
12 // load config
13 require MINIFY_MIN_DIR . '/config.php';
14
15 // setup include path
16 set_include_path($min_libPath . PATH_SEPARATOR . get_include_path());
17
18 require 'Minify.php';
19
20 Minify::$uploaderHoursBehind = $min_uploaderHoursBehind;
21 Minify::setCache(
22     isset($min_cachePath) ? $min_cachePath : ''
23     ,$min_cacheFileLocking
24 );
25
26 if ($min_documentRoot) {
27     $_SERVER['DOCUMENT_ROOT'] = $min_documentRoot;
28 } elseif (0 === stripos(PHP_OS, 'win')) {
29     Minify::setDocRoot(); // IIS may need help
30 }
31
32 $min_serveOptions['minifierOptions']['text/css']['symlinks'] = $min_symlinks;
33
34 if ($min_allowDebugFlag && isset($_GET['debug'])) {
35     $min_serveOptions['debug'] = true;
36 }
37
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));
43     } else {
44         Minify_Logger::setLogger($min_errorLogger);
45     }
46 }
47
48 // check for URI versioning
49 if (preg_match('/&\\d/', $_SERVER['QUERY_STRING'])) {
50     $min_serveOptions['maxAge'] = 31536000;
51 }
52 if (isset($_GET['g'])) {
53     // well need groups config
54     $min_serveOptions['minApp']['groups'] = (require MINIFY_MIN_DIR . '/groupsConfig.php');
55 }
56 if (isset($_GET['f']) || isset($_GET['g'])) {
57     // serve!   
58     Minify::serve('MinApp', $min_serveOptions);
59         
60 } elseif ($min_enableBuilder) {
61     header('Location: builder/');
62     exit();
63 } else {
64     header("Location: /");
65     exit();
66 }