Skip to content

Commit

Permalink
Things should mostly work, and as such we release it!
Browse files Browse the repository at this point in the history
Read release notes.
  • Loading branch information
mescon authored Feb 11, 2017
2 parents df4d81a + d0f3063 commit 71f1bca
Show file tree
Hide file tree
Showing 96 changed files with 17,316 additions and 3,389 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.txt ident
* -text
*.txt ident
39 changes: 24 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# Do not submit or pull configuration settings when interacting with GitHub.
config.ini.php
settings.ini.php
backup.ini.php
test.php
secret.txt
tmp/
pydio/
phpmyadmin/
*.idea
.vscode/
plexredirect/
recent/
keeweb/
api/
# Do not submit or pull configuration settings when interacting with GitHub.
config.ini.php
settings.ini.php
backup.ini.php
muximux.log
stage/
.stage/
css/theme/
js/iconset-muximux.js
!css/theme/Modern.css
!css/theme/Classic.css
test.php
secret.txt
tmp/
pydio/
phpmyadmin/
*.idea
.vscode/
plexredirect/
recent/
keeweb/
api/
cache/
test/
682 changes: 342 additions & 340 deletions LICENSE

Large diffs are not rendered by default.

21 changes: 9 additions & 12 deletions browserconfig.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Please read: http://msdn.microsoft.com/en-us/library/ie/dn455106.aspx -->
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="images/tile.png"/>
<square150x150logo src="images/tile.png"/>
<wide310x150logo src="images/tile-wide.png"/>
<square310x310logo src="images/tile.png"/>
</tile>
</msapplication>
</browserconfig>
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="images/favicon/mstile-150x150.png?v=ngGoyLXN9n"/>
<TileColor>#2b5797</TileColor>
</tile>
</msapplication>
</browserconfig>
145 changes: 145 additions & 0 deletions combineify.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<?php
require dirname(__FILE__) . '/vendor/autoload.php';
use MatthiasMullie\Minify;
/************************************************************************
* CSS and Javascript Combinator 0.6
* Copyright 2006 by Niels Leenheer
* Updated 2016 - d8ahazard
*/


if (ini_get('max_execution_time')) {
ini_set('max_execution_time', '300');
}
$cache = true;
$cachedir = dirname(__FILE__) . '/cache';
if ((!file_exists($cachedir)) && $cache) {
mkdir($cachedir, 0777, true);
}

$type = $_GET['type'];
$elements = explode(',', $_GET['files']);

// Determine last modification date of the files
$lastmodified = 0;
while (list(,$element) = each($elements)) {
$path = realpath($element);

if (($type == 'javascript' && substr($path, -3) != '.js') ||
($type == 'css' && substr($path, -4) != '.css')) {
header ("HTTP/1.0 403 Forbidden");
exit;
}

if (!file_exists($path)) {
header ("HTTP/1.0 404 Not Found");
exit;
}

$lastmodified = max($lastmodified, filemtime($path));
}

// Send Etag hash
$hash = $lastmodified . '-' . md5($_GET['files']);
header ("Etag: \"" . $hash . "\"");

if (isset($_SERVER['HTTP_IF_NONE_MATCH']) &&
stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) == '"' . $hash . '"')
{
// Return visit and no modifications, so do not send anything
header ("HTTP/1.0 304 Not Modified");
header ('Content-Length: 0');
}
else
{
// First time visit or files were modified
if ($cache)
{
// Determine supported compression method
$gzip = strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip');
$deflate = strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate');

// Determine used compression method
$encoding = $gzip ? 'gzip' : ($deflate ? 'deflate' : 'none');

// Check for buggy versions of Internet Explorer
if (!strstr($_SERVER['HTTP_USER_AGENT'], 'Opera') &&
preg_match('/^Mozilla\/4\.0 \(compatible; MSIE ([0-9]\.[0-9])/i', $_SERVER['HTTP_USER_AGENT'], $matches)) {
$version = floatval($matches[1]);

if ($version < 6)
$encoding = 'none';

if ($version == 6 && !strstr($_SERVER['HTTP_USER_AGENT'], 'EV1'))
$encoding = 'none';
}

// Try the cache first to see if the combined files were already generated
$cachefile = 'cache-' . $hash . '.' . $type . ($encoding != 'none' ? '.' . $encoding : '');

if (file_exists($cachedir . '/' . $cachefile)) {
if ($fp = fopen($cachedir . '/' . $cachefile, 'rb')) {

if ($encoding != 'none') {
header ("Content-Encoding: " . $encoding);
}

header ("Content-Type: text/" . $type);
header ("Content-Length: " . filesize($cachedir . '/' . $cachefile));

fpassthru($fp);
fclose($fp);
exit;
}
}
}

// Get contents of the files
$contents = '';
reset($elements);
if ($type == 'css') {
$minifier = new Minify\CSS();
}
if ($type =='javascript') {
$minifier = new Minify\JS();
}
while (list(,$element) = each($elements)) {
$path = realpath($element);
$minifier->add($path);
}

$contents = $minifier->minify();


// Send Content-Type
header ("Content-Type: text/" . $type);
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60 * 24 * 360))); // 30 days
if (isset($encoding) && $encoding != 'none')
{
// Send compressed contents
$contents = gzencode($contents, 9, $gzip ? FORCE_GZIP : FORCE_DEFLATE);
header ("Content-Encoding: " . $encoding);
header ('Content-Length: ' . strlen($contents));
echo $contents;
}
else
{
// Send regular contents
header ('Content-Length: ' . strlen($contents));
echo $contents;
}

// Store cache
if ($cache) {
$cacheString = $cachedir."/*".$type.".gzip";
foreach (glob($cacheString) as $file) {
unlink($file);
}

if ($fp = fopen($cachedir . '/' . $cachefile, 'wb')) {
fwrite($fp, $contents);
fclose($fp);
}
}
}
?>
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
}
],
"require": {
"pear-pear.php.net/config_lite": "*"
"pear-pear.php.net/config_lite": "*",
"matthiasmullie/minify": "^1.3"

}
}
9 changes: 1 addition & 8 deletions css/cssreset.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/font-awesome.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 71f1bca

Please sign in to comment.