aboutsummaryrefslogtreecommitdiff
path: root/mod/minify/lib/min/index.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 01:07:33 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 01:07:33 +0000
commitfbc1fdd0b7244d2f03164b62eb893223ff930319 (patch)
tree2b1c79d2795ee2d1ecc3b019fe3643bcf52010ad /mod/minify/lib/min/index.php
parent3a6e0dc6e80434789abe5b98e2748a6fc79bf320 (diff)
downloadelgg-fbc1fdd0b7244d2f03164b62eb893223ff930319.tar.gz
elgg-fbc1fdd0b7244d2f03164b62eb893223ff930319.tar.bz2
Converted most forms to use elgg_view_form (therefore also moved the views to forms/*). Some views are left that _only_ do elgg_view_form, so I wonder if those should even be kept around.
git-svn-id: http://code.elgg.org/elgg/trunk@8127 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/minify/lib/min/index.php')
-rw-r--r--mod/minify/lib/min/index.php66
1 files changed, 66 insertions, 0 deletions
diff --git a/mod/minify/lib/min/index.php b/mod/minify/lib/min/index.php
new file mode 100644
index 000000000..51c352569
--- /dev/null
+++ b/mod/minify/lib/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();
+}