summaryrefslogtreecommitdiff
path: root/min/index.php
diff options
context:
space:
mode:
authorAlib <aliboba@free.fr>2010-03-22 20:31:41 +0100
committerAlib <aliboba@free.fr>2010-03-22 20:31:41 +0100
commit56df9ea9ad0810b8c1e6b581fdf44a55750a5c04 (patch)
tree76c6151865bce700c4e7e522d0e03cd931b43957 /min/index.php
parent746232eec6b8e1c6a535ba9810301a128977f5e8 (diff)
downloadistreamdev-56df9ea9ad0810b8c1e6b581fdf44a55750a5c04.tar.gz
istreamdev-56df9ea9ad0810b8c1e6b581fdf44a55750a5c04.tar.bz2
Added Minify to concatenate and minimize css and js file and gzip them. Cleaned directories, moved all css and js in respective folders.
Diffstat (limited to 'min/index.php')
-rw-r--r--min/index.php66
1 files changed, 66 insertions, 0 deletions
diff --git a/min/index.php b/min/index.php
new file mode 100644
index 0000000..51c3525
--- /dev/null
+++ b/min/index.php
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Front controller for default Minify implementation
+ *
+ * DO NOT EDIT! Configure this utility via config.php and groupsConfig.php
+ *
+ * @package Minify
+ */
+
+define('MINIFY_MIN_DIR', dirname(__FILE__));
+
+// load config
+require MINIFY_MIN_DIR . '/config.php';
+
+// setup include path
+set_include_path($min_libPath . PATH_SEPARATOR . get_include_path());
+
+require 'Minify.php';
+
+Minify::$uploaderHoursBehind = $min_uploaderHoursBehind;
+Minify::setCache(
+ isset($min_cachePath) ? $min_cachePath : ''
+ ,$min_cacheFileLocking
+);
+
+if ($min_documentRoot) {
+ $_SERVER['DOCUMENT_ROOT'] = $min_documentRoot;
+} elseif (0 === stripos(PHP_OS, 'win')) {
+ Minify::setDocRoot(); // IIS may need help
+}
+
+$min_serveOptions['minifierOptions']['text/css']['symlinks'] = $min_symlinks;
+
+if ($min_allowDebugFlag && isset($_GET['debug'])) {
+ $min_serveOptions['debug'] = true;
+}
+
+if ($min_errorLogger) {
+ require_once 'Minify/Logger.php';
+ if (true === $min_errorLogger) {
+ require_once 'FirePHP.php';
+ Minify_Logger::setLogger(FirePHP::getInstance(true));
+ } else {
+ Minify_Logger::setLogger($min_errorLogger);
+ }
+}
+
+// check for URI versioning
+if (preg_match('/&\\d/', $_SERVER['QUERY_STRING'])) {
+ $min_serveOptions['maxAge'] = 31536000;
+}
+if (isset($_GET['g'])) {
+ // well need groups config
+ $min_serveOptions['minApp']['groups'] = (require MINIFY_MIN_DIR . '/groupsConfig.php');
+}
+if (isset($_GET['f']) || isset($_GET['g'])) {
+ // serve!
+ Minify::serve('MinApp', $min_serveOptions);
+
+} elseif ($min_enableBuilder) {
+ header('Location: builder/');
+ exit();
+} else {
+ header("Location: /");
+ exit();
+}