summaryrefslogtreecommitdiffstats
path: root/admin/survey/minify
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/minify')
-rw-r--r--admin/survey/minify/.htaccess26
-rw-r--r--admin/survey/minify/.php_cs44
-rw-r--r--admin/survey/minify/.semver6
-rw-r--r--admin/survey/minify/.travis.yml19
-rw-r--r--admin/survey/minify/CHANGELOG.md142
-rw-r--r--admin/survey/minify/bootstrap.php2
-rw-r--r--admin/survey/minify/builder/.htaccess4
-rw-r--r--admin/survey/minify/builder/index.php2
-rw-r--r--admin/survey/minify/builder/ocCheck.php3
-rw-r--r--admin/survey/minify/builder/test.php4
-rw-r--r--admin/survey/minify/composer.json19
-rw-r--r--admin/survey/minify/config-test.php3
-rw-r--r--admin/survey/minify/groupsConfig.php13
-rw-r--r--admin/survey/minify/index.php4
-rw-r--r--admin/survey/minify/lib/HTTP/ConditionalGet.php4
-rw-r--r--admin/survey/minify/lib/HTTP/Encoder.php18
-rw-r--r--admin/survey/minify/lib/Minify.php7
-rw-r--r--admin/survey/minify/lib/Minify/App.php6
-rw-r--r--admin/survey/minify/lib/Minify/CSSmin.php12
-rw-r--r--admin/survey/minify/lib/Minify/Cache/Null.php2
-rw-r--r--admin/survey/minify/lib/Minify/Cache/WinCache.php2
-rw-r--r--admin/survey/minify/lib/Minify/Controller/Files.php1
-rw-r--r--admin/survey/minify/lib/Minify/Controller/Groups.php1
-rw-r--r--admin/survey/minify/lib/Minify/Controller/Page.php1
-rw-r--r--admin/survey/minify/lib/Minify/ControllerInterface.php2
-rw-r--r--admin/survey/minify/lib/Minify/HTML.php59
-rw-r--r--admin/survey/minify/lib/Minify/ImportProcessor.php4
-rw-r--r--admin/survey/minify/lib/Minify/JS/ClosureCompiler.php4
-rw-r--r--admin/survey/minify/lib/Minify/NailgunClosureCompiler.php2
-rw-r--r--admin/survey/minify/lib/Minify/Source/Factory.php2
-rw-r--r--admin/survey/minify/lib/Minify/YUICompressor.php1
-rw-r--r--admin/survey/minify/lib/MrClay/Cli.php1
-rw-r--r--admin/survey/minify/phpunit.xml4
-rw-r--r--admin/survey/minify/server-info.php3
-rw-r--r--admin/survey/minify/static/.htaccess80
-rw-r--r--admin/survey/minify/static/gen.php4
-rw-r--r--admin/survey/minify/static/lib.php12
-rw-r--r--admin/survey/minify/utils.php2
38 files changed, 334 insertions, 191 deletions
diff --git a/admin/survey/minify/.htaccess b/admin/survey/minify/.htaccess
index 06c1161..adb0653 100644
--- a/admin/survey/minify/.htaccess
+++ b/admin/survey/minify/.htaccess
@@ -1,13 +1,13 @@
-<IfModule mod_rewrite.c>
-RewriteEngine on
-
-# You may need RewriteBase on some servers
-#RewriteBase /min
-
-# rewrite URLs like "/min/f=..." to "/min/?f=..."
-RewriteRule ^([bfg]=.*) index.php?$1 [L,NE]
-</IfModule>
-<IfModule mod_env.c>
-# In case AddOutputFilterByType has been added
-SetEnv no-gzip
-</IfModule>
+<IfModule mod_rewrite.c>
+RewriteEngine on
+
+# You may need RewriteBase on some servers
+#RewriteBase /min
+
+# rewrite URLs like "/min/f=..." to "/min/?f=..."
+RewriteRule ^([bfg]=.*) index.php?$1 [L,NE]
+</IfModule>
+<IfModule mod_env.c>
+# In case AddOutputFilterByType has been added
+SetEnv no-gzip
+</IfModule>
diff --git a/admin/survey/minify/.php_cs b/admin/survey/minify/.php_cs
index d0e6de4..8edfbaa 100644
--- a/admin/survey/minify/.php_cs
+++ b/admin/survey/minify/.php_cs
@@ -1,27 +1,23 @@
<?php
-$finder = Symfony\CS\Finder\DefaultFinder::create()
- ->in(__DIR__ . '/lib')
-;
+$rules = array(
+ '@PSR2' => true,
+);
-return Symfony\CS\Config\Config::create()
- ->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
- ->setUsingCache(true)
- ->fixers(array(
- 'linefeed',
- 'trailing_spaces',
- 'unused_use',
- 'short_tag',
- 'return',
- 'visibility',
- 'php_closing_tag',
- 'extra_empty_lines',
- 'function_declaration',
- 'include',
- 'controls_spaces',
- 'elseif',
- '-eof_ending',
- '-method_argument_space',
- ))
- ->finder($finder)
-;
+$config = PhpCsFixer\Config::create();
+$finder = $config->getFinder();
+
+$finder
+ ->in(array('.', 'builder/', 'lib/', 'tests/', 'min_extras/', 'static/'))
+ ->name('*.php')
+ ->ignoreDotFiles(true)
+ ->ignoreVCS(true);
+
+return $config
+ ->setUsingCache(true)
+ ->setRiskyAllowed(true)
+ ->setRules($rules)
+ ->setIndent(' ')
+ ->setLineEnding("\n");
+
+// vim:ft=php
diff --git a/admin/survey/minify/.semver b/admin/survey/minify/.semver
new file mode 100644
index 0000000..547de9d
--- /dev/null
+++ b/admin/survey/minify/.semver
@@ -0,0 +1,6 @@
+---
+:major: 3
+:minor: 0
+:patch: 11
+:special: ''
+:metadata: ''
diff --git a/admin/survey/minify/.travis.yml b/admin/survey/minify/.travis.yml
index a8a35cd..c89a368 100644
--- a/admin/survey/minify/.travis.yml
+++ b/admin/survey/minify/.travis.yml
@@ -5,7 +5,8 @@ dist: trusty
jobs:
fast_finish: true
allow_failures:
- - php: "hhvm"
+ - php: "nightly"
+ - name: "Php CS Fixer"
include:
- php: "5.3"
dist: precise
@@ -15,8 +16,13 @@ jobs:
- php: "7.0"
- php: "7.1"
- php: "7.2"
+ - php: "7.3"
+ - php: "7.4"
- php: "nightly"
- - php: "hhvm"
+ - name: "Php CS Fixer"
+ php: "7.3"
+ env:
+ - PHP_CS_FIXER=1
env:
- CLOSURE_VERSION: 20161024
@@ -36,7 +42,14 @@ before_script:
- tests/dl-closure.sh
script:
+ - PATH=vendor/bin:$PATH
- composer validate
- - phpunit --verbose
+ - |
+ if [ "$PHP_CS_FIXER" ]; then
+ composer config --unset platform.php
+ composer require --dev friendsofphp/php-cs-fixer:2.16
+ php-cs-fixer fix --verbose --diff --dry-run --ansi
+ fi
+ - vendor/bin/phpunit --verbose
# vim:ts=2:sw=2:et
diff --git a/admin/survey/minify/CHANGELOG.md b/admin/survey/minify/CHANGELOG.md
index 4f5d424..78db1f7 100644
--- a/admin/survey/minify/CHANGELOG.md
+++ b/admin/survey/minify/CHANGELOG.md
@@ -1,18 +1,101 @@
-## Version 3.0.3 (2017-11-03)
+# Changelog
-* Fix closure-compiler's error "redirection limit reached". #618, #619
+All notable changes to this project will be documented in this file.
-## Version 3.0.2 (2017-09-14)
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-* Fixes syntax error in Groups controller, #613
-* Better-maintained lessphp fork, #610
-* No longer corrupts some chars in some environments, #608
+## [3.0.11] - 2021-03-11
-## Version 3.0.1 (2017-06-09)
+- PHP 8.0 support, [#685], [#682], [#677]
-* Update CSSmin to v4, #599, #590
+[3.0.11]: https://github.com/mrclay/minify/compare/3.0.10...3.0.11
+[#685]: https://github.com/mrclay/minify/pull/685
+[#682]: https://github.com/mrclay/minify/pull/682
+[#677]: https://github.com/mrclay/minify/pull/677
+
+## [3.0.10] - 2020-04-02
+
+- Exclude SSI Comments from HTML minify, [#670], [#671]
+
+[3.0.10]: https://github.com/mrclay/minify/compare/3.0.9...3.0.10
+[#671]: https://github.com/mrclay/minify/issues/671
+[#670]: https://github.com/mrclay/minify/pull/670
+
+## [3.0.9] - 2020-03-24
+
+- Allow `intervention/httpauth` 3.x, [#667], [#666], [#664]
+
+[3.0.9]: https://github.com/mrclay/minify/compare/3.0.8...3.0.9
+[#664]: https://github.com/mrclay/minify/issues/664
+[#666]: https://github.com/mrclay/minify/pull/666
+[#667]: https://github.com/mrclay/minify/pull/667
+
+## [3.0.8] - 2020-03-19
+
+- Removed deprecated get_magic_quotes_gpc() function that since PHP 5.4.0 returns FALSE always, and since PHP 7.4 is deprecated, [#661]
+
+[3.0.8]: https://github.com/mrclay/minify/compare/3.0.7...3.0.8
+[#661]: https://github.com/mrclay/minify/pull/661
+
+## [3.0.7] - 2019-12-10
+
+- Allow mrclay/props-dic ^3.0, [#658]
+
+[3.0.7]: https://github.com/mrclay/minify/compare/3.0.6...3.0.7
+[#658]: https://github.com/mrclay/minify/pull/658
+
+## [3.0.6] - 2019-10-28
+
+- Bugfix for option sanitizer, [#654], [#655]
+
+[3.0.6]: https://github.com/mrclay/minify/compare/3.0.5...3.0.6
+[#654]: https://github.com/mrclay/minify/issues/654
+[#655]: https://github.com/mrclay/minify/pull/655
+
+## [3.0.5] - 2019-10-01
+
+- Fix syntax error in composer.json, [#653]
+
+[3.0.5]: https://github.com/mrclay/minify/compare/3.0.4...3.0.5
+[#653]: https://github.com/mrclay/minify/pull/653
+
+## 3.0.4 - 2019-09-24
+
+- Fix PHP 7.3 compatibility issues, [#648]
+
+[3.0.4]: https://github.com/mrclay/minify/compare/3.0.3...3.0.4
+[#648]: https://github.com/mrclay/minify/issues/648
+
+## [3.0.3] - 2017-11-03
+
+- Fix closure-compiler's error "redirection limit reached". [#618], [#619]
+
+[3.0.3]: https://github.com/mrclay/minify/compare/3.0.2...3.0.3
+[#618]: https://github.com/mrclay/minify/pull/618
+[#619]: https://github.com/mrclay/minify/issues/619
+
+## [3.0.2] - 2017-09-14
+
+- Fixes syntax error in Groups controller, [#613]
+- Better-maintained lessphp fork, [#610]
+- No longer corrupts some chars in some environments, [#608]
+
+[3.0.2]: https://github.com/mrclay/minify/compare/3.0.1...3.0.2
+[#608]: https://github.com/mrclay/minify/pull/608
+[#610]: https://github.com/mrclay/minify/pull/610
+[#613]: https://github.com/mrclay/minify/issues/613
+
+## [3.0.1] - 2017-06-09
+
+- Update CSSmin to v4, [#599], [#590]
+
+[3.0.1]: https://github.com/mrclay/minify/compare/3.0.0...3.0.1
+[#590]: https://github.com/mrclay/minify/issues/590
+[#599]: https://github.com/mrclay/minify/pull/599
+
+## 3.0.0 - 2017-04-03
-## Version 3.0.0 (2017-04-03)
* Improved CSS minification via Túbal Martín's CSSMin
* Easier error identification (just see error_log)
* Adds feature to serve static files directly
@@ -30,7 +113,8 @@
* BREAKING: Removes `$min_libPath` option
* BREAKING: The Minify, source, and controller components have changed APIs
-## Version 2.3.0 (2016-03-11)
+## 2.3.0 - 2016-03-11
+
* Adds `$min_concatOnly` option to just concatenate files
* Deprecates use of Minify_Loader
* Deprecates use of Minify_Logger
@@ -38,13 +122,15 @@
* Deprecates use of FirePHP
* Deprecates use of DooDigestAuth
-## Version 2.2.1 (2014-10-30)
+## 2.2.1 - 2014-10-30
+
* Builder styled with Bootstrap (thanks to help from acidvertigo)
* Update CSSmin to v.2.4.8
* Added WinCache
* URLs with spaces properly rewritten
-## Version 2.2.0 (2014-03-12)
+## 2.2.0 - 2014-03-12
+
* Fix handling of RegEx in certain situations in JSMin
* Thanks to Vovan-VE for reporting this
* Update composer.json with support info
@@ -66,11 +152,13 @@
* Allow far-future expiration and file versioning with the "v" querystirng parameter in addition to existing method
* Lots of general code tidy ups
-## Version 2.1.7 (2013-07-23)
+## 2.1.7 - 2013-07-23
+
* Fixes arbitrary file inclusion vulnerability on some systems
* Thanks to Matt Mecham for reporting this
-## Version 2.1.6 (2013-07-19)
+## 2.1.6 - 2013-07-19
+
* JSMin fixes
* Prevents some Closure Compiler API failures
* Uses autoloading for all class loading
@@ -82,7 +170,8 @@
* CLI script more portable
* Adds composer.json
-## Version 2.1.5 (2012-03-10)
+## 2.1.5 - 2012-03-10
+
* Removed XSS vulnerability
* Disabled builder by default
* command line tools to minify and rewrite URIs in CSS
@@ -91,7 +180,8 @@
* Closure Compiler uses cURL when allow\_url\_fopen is off
* Missing file notices when using groups
-## Version 2.1.4b (2010-07-10)
+## 2.1.4b - 2010-07-10
+
* Option to minify JS with Closure Compiler API w/ JSMin failover
* Cookie/bookmarklet-based debug mode. No HTML editing!
* Allows 1 file to be missing w/o complete failure
@@ -107,7 +197,8 @@
* Removed annoying maxFiles limit
* mbstring.func\_overload usage is safer
-## Version 2.1.3 (2009-06-30)
+## 2.1.3 - 2009-06-30
+
* CSS fixes
* A few URI rewriting bugs fixed
* comment/whitespace removal no longer breaks some values
@@ -122,7 +213,8 @@
* API: Can set contentType Minify\_Source objects (fixes an annoying [caveat](http://groups.google.com/group/minify/msg/8446d32ee99a4961))
* [Resolved Issue list](http://code.google.com/p/minify/issues/list?can=1&q=label%3ARelease-2.1.2%20status%3AVerified)
-## Version 2.1.2 (2009-03-04)
+## 2.1.2 - 2009-03-04
+
* Javascript fixes
* Debug mode no longer confused by `*/*` in strings/RegExps (jQuery)
* quote characters inside RegExp literals no longer cause exception
@@ -134,14 +226,16 @@
* Builder app doesn't fail on systems without gzdeflate()
* APC caching class included
-## Version 2.1.1 (2008-10-19)
+## 2.1.1 - 2008-10-19
+
* Bug fix release
* Detection and workarounds for zlib.output\_compression and non-PHP encoding modules
* Zlib not required (mod\_rewrite, et.al., can still be used for encoding)
* HTML : More IE conditional comments preserved
* Minify\_groupUri() utility fixed
-## Version 2.1.0 (2008-09-18)
+## 2.1.0 - 2008-09-18
+
* "min" default application for quick deployment
* Minify URI Builder app & bookmarklet for quickly creating minify URIs
* Relative URIs in CSS file are fixed automatically by default
@@ -157,8 +251,8 @@
* Minify\_Cache\_File has flock()s (by default)
* Workaround for Windows mtime reporting bug
+## 2.0.0 - 2008-05-22
-## Version 2.0.0 (2008-05-22)
* Complete code overhaul. Minify is now a PEAR-style class and toolkit for building customized minifying file servers.
* Content-Encoding: deflate/gzip/compress, based on request headers
* Expanded CSS and HTML minifiers with test cases
@@ -167,10 +261,12 @@
* Compression & encoding modules lazy-loaded as needed (304 responses use minimal code)
* Separate utility classes for HTTP encoding and cache control
-## Version 1.0.1 (2007-05-05)
+## 1.0.1 - 2007-05-05
+
* Fixed various problems resolving pathnames when hosted on an NFS mount.
* Fixed 'undefined constant' notice.
* Replaced old JSMin library with a much faster custom implementation.
-## Version 1.0.0 (2007-05-02)
+## 1.0.0 - 2007-05-02
+
* First release.
diff --git a/admin/survey/minify/bootstrap.php b/admin/survey/minify/bootstrap.php
index 4812aea..be0809c 100644
--- a/admin/survey/minify/bootstrap.php
+++ b/admin/survey/minify/bootstrap.php
@@ -25,4 +25,4 @@ call_user_func(function () {
require $file;
});
-return new \Minify\App(__DIR__);
+return new \Minify\App(__DIR__); \ No newline at end of file
diff --git a/admin/survey/minify/builder/.htaccess b/admin/survey/minify/builder/.htaccess
new file mode 100644
index 0000000..2da1eff
--- /dev/null
+++ b/admin/survey/minify/builder/.htaccess
@@ -0,0 +1,4 @@
+<IfModule mod_rewrite.c>
+RewriteEngine on
+RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
+</IfModule> \ No newline at end of file
diff --git a/admin/survey/minify/builder/index.php b/admin/survey/minify/builder/index.php
index a9a58c2..1240513 100644
--- a/admin/survey/minify/builder/index.php
+++ b/admin/survey/minify/builder/index.php
@@ -1,4 +1,4 @@
-<?php
+<?php
$app = (require __DIR__ . '/../bootstrap.php');
/* @var \Minify\App $app */
diff --git a/admin/survey/minify/builder/ocCheck.php b/admin/survey/minify/builder/ocCheck.php
index 85b272c..c357b11 100644
--- a/admin/survey/minify/builder/ocCheck.php
+++ b/admin/survey/minify/builder/ocCheck.php
@@ -1,7 +1,7 @@
<?php
/**
* AJAX checks for zlib.output_compression
- *
+ *
* @package Minify
*/
@@ -29,7 +29,6 @@ if ($app->env->get('hello')) {
));
$he->encode();
$he->sendAll();
-
} else {
// echo status "0" or "1"
header('Content-Type: text/plain');
diff --git a/admin/survey/minify/builder/test.php b/admin/survey/minify/builder/test.php
index b818f8c..95e3dd2 100644
--- a/admin/survey/minify/builder/test.php
+++ b/admin/survey/minify/builder/test.php
@@ -37,7 +37,7 @@ if (isset($_GET['oc'])) {
echo "<p class=topNote><strong>\$_SERVER['SUBDOMAIN_DOCUMENT_ROOT'] is set.</strong> "
. "You may need to set \$min_documentRoot to this in config.php</p>";
}
-
+
}
-//*/ \ No newline at end of file
+//*/
diff --git a/admin/survey/minify/composer.json b/admin/survey/minify/composer.json
index d306dd7..3ead9a9 100644
--- a/admin/survey/minify/composer.json
+++ b/admin/survey/minify/composer.json
@@ -1,7 +1,7 @@
{
"name": "mrclay/minify",
"type": "library",
- "description": "Minify is a PHP5 app that helps you follow several rules for client-side performance. It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers",
+ "description": "Minify is a PHP app that helps you follow several rules for client-side performance. It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers",
"homepage": "https://github.com/mrclay/minify",
"license": "BSD-3-Clause",
"authors": [
@@ -22,26 +22,31 @@
"autoload-dev": {
"psr-4": {"Minify\\Test\\": "tests/"}
},
+ "config": {
+ "platform": {
+ "php": "5.3.29"
+ },
+ "sort-packages": true
+ },
"require": {
+ "php": "^5.3.0 || ^7.0 || ^8.0",
"ext-pcre": "*",
- "intervention/httpauth": "~2.0",
- "monolog/monolog": "~1.1",
+ "intervention/httpauth": "^2.0|^3.0",
+ "marcusschwarz/lesserphp": "^0.5.1",
+ "monolog/monolog": "~1.1|~2.0",
"mrclay/jsmin-php": "~2",
- "mrclay/props-dic": "^2.2",
- "php": "^5.3.0 || ^7.0",
+ "mrclay/props-dic": "^2.2|^3.0",
"tubalmartin/cssmin": "~4"
},
"require-dev": {
"firephp/firephp-core": "~0.4.0",
"leafo/scssphp": "^0.3 || ^0.6 || ^0.7",
- "marcusschwarz/lesserphp": "~0.5.1",
"meenie/javascript-packer": "~1.1",
"phpunit/phpunit": "^4.8.36",
"tedivm/jshrink": "~1.1.0"
},
"suggest": {
"firephp/firephp-core": "Use FirePHP for Log messages",
- "marcusschwarz/lesserphp": "LESS support",
"meenie/javascript-packer": "Keep track of the Packer PHP port using Composer"
},
"scripts": {
diff --git a/admin/survey/minify/config-test.php b/admin/survey/minify/config-test.php
index c903086..790b81b 100644
--- a/admin/survey/minify/config-test.php
+++ b/admin/survey/minify/config-test.php
@@ -4,7 +4,6 @@
*
* To test config options, place them in this file and add "&test" to your Minify URL.
* Note that if this is on a public server, anyone can execute your test.
- *
+ *
* @package Minify
*/
-
diff --git a/admin/survey/minify/groupsConfig.php b/admin/survey/minify/groupsConfig.php
index 38987e9..10f6b85 100644
--- a/admin/survey/minify/groupsConfig.php
+++ b/admin/survey/minify/groupsConfig.php
@@ -47,8 +47,9 @@ return [
dirname(__FILE__).'/../script/statistika.js',
dirname(__FILE__).'/../script/vprasanje.js',
dirname(__FILE__).'/../script/vprasanjeInline.js',
+ dirname(__FILE__).'/../script/vprasanjeDeleted.js',
+ dirname(__FILE__).'/../script/comments.js',
dirname(__FILE__).'/../script/prevajanje.js',
- dirname(__FILE__).'/../script/telefon.js',
dirname(__FILE__).'/../script/missingValues.js',
dirname(__FILE__).'/../script/missingProfiles.js',
dirname(__FILE__).'/../script/variableProfiles.js',
@@ -89,6 +90,7 @@ return [
dirname(__FILE__).'/../script/trak_respondent.js',
dirname(__FILE__).'/../script/GDPR.js',
dirname(__FILE__).'/../script/narocila.js',
+ dirname(__FILE__).'/../script/domainChange.js',
dirname(__FILE__).'/../script/HeatMap/heatmap_admin.js',
dirname(__FILE__).'/../script/HeatMap/HeatMapCanvasAdmin.js',
dirname(__FILE__).'/../script/HeatMap/HeatMapSumarnikPopUp.js',
@@ -97,6 +99,10 @@ return [
dirname(__FILE__).'/../script/DragDrop/dragdropInAdmin.js',
dirname(__FILE__).'/../script/custom_column_label_respondent.js',
dirname(__FILE__).'/../script/ImageHotSpot/imagemap_question_editor.js',
+ dirname(__FILE__).'/../script/ImageHotSpot/imageHotspot.js',
+
+ dirname(__FILE__).'/../script/Chartjs/chart.js', //source za chartjs grafe
+ dirname(__FILE__).'/../script/Chartjs.js',
dirname(__FILE__).'/../script/jquery/jquery.imagemapster.js',
@@ -210,6 +216,7 @@ return [
dirname(__FILE__).'/../script/dostop.js',
dirname(__FILE__).'/../script/narocila.js',
dirname(__FILE__).'/../script/datepicker.js',
+ dirname(__FILE__).'/../script/notifications.js',
],
@@ -289,7 +296,9 @@ return [
dirname(__FILE__).'/../css/style_sprites_test.css',
# css za admin
- dirname(__FILE__).'/../../../public/css/admin.css',
+ //dirname(__FILE__).'/../../../public/css/admin.css',
+ dirname(__FILE__).'/../../../public/css/admin_new.css',
+
dirname(__FILE__).'/../script/jquery/jquery.selectbox-0.6.1/css/jquery.selectbox.css',
dirname(__FILE__).'/../script/jquery/jquery.ui.Slider.Pips/jquery-ui-slider-pips.css',
diff --git a/admin/survey/minify/index.php b/admin/survey/minify/index.php
index 2d17007..9c98438 100644
--- a/admin/survey/minify/index.php
+++ b/admin/survey/minify/index.php
@@ -1,9 +1,9 @@
<?php
/**
* Sets up MinApp controller and serves files
- *
+ *
* DO NOT EDIT! Configure this utility via config.php and groupsConfig.php
- *
+ *
* @package Minify
*/
diff --git a/admin/survey/minify/lib/HTTP/ConditionalGet.php b/admin/survey/minify/lib/HTTP/ConditionalGet.php
index d81f8db..1ae37fb 100644
--- a/admin/survey/minify/lib/HTTP/ConditionalGet.php
+++ b/admin/survey/minify/lib/HTTP/ConditionalGet.php
@@ -128,8 +128,8 @@ class HTTP_ConditionalGet
$etagAppend = '';
if (isset($spec['encoding'])) {
$this->_stripEtag = true;
- $this->_headers['Vary'] = 'Accept-Encoding';
if ('' !== $spec['encoding']) {
+ $this->_headers['Vary'] = 'Accept-Encoding';
if (0 === strpos($spec['encoding'], 'x-')) {
$spec['encoding'] = substr($spec['encoding'], 2);
}
@@ -317,7 +317,7 @@ class HTTP_ConditionalGet
if (!isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
return false;
}
- $clientEtagList = get_magic_quotes_gpc()
+ $clientEtagList = PHP_VERSION_ID < 50400 && get_magic_quotes_gpc()
? stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])
: $_SERVER['HTTP_IF_NONE_MATCH'];
$clientEtags = explode(',', $clientEtagList);
diff --git a/admin/survey/minify/lib/HTTP/Encoder.php b/admin/survey/minify/lib/HTTP/Encoder.php
index c1c989e..b489242 100644
--- a/admin/survey/minify/lib/HTTP/Encoder.php
+++ b/admin/survey/minify/lib/HTTP/Encoder.php
@@ -204,9 +204,10 @@ class HTTP_Encoder
}
// gzip checks (slow)
if (preg_match(
- '@(?:^|,)\\s*((?:x-)?gzip)\\s*(?:$|,|;\\s*q=(?:0\\.|1))@'
- ,$ae
- ,$m)) {
+ '@(?:^|,)\\s*((?:x-)?gzip)\\s*(?:$|,|;\\s*q=(?:0\\.|1))@',
+ $ae,
+ $m
+ )) {
return array('gzip', $m[1]);
}
if ($allowDeflate) {
@@ -217,14 +218,17 @@ class HTTP_Encoder
|| 0 === strpos($ae, 'deflate,') // opera
// slow parsing
|| preg_match(
- '@(?:^|,)\\s*deflate\\s*(?:$|,|;\\s*q=(?:0\\.|1))@', $ae)) {
+ '@(?:^|,)\\s*deflate\\s*(?:$|,|;\\s*q=(?:0\\.|1))@',
+ $ae
+ )) {
return array('deflate', 'deflate');
}
}
if ($allowCompress && preg_match(
- '@(?:^|,)\\s*((?:x-)?compress)\\s*(?:$|,|;\\s*q=(?:0\\.|1))@'
- ,$ae
- ,$m)) {
+ '@(?:^|,)\\s*((?:x-)?compress)\\s*(?:$|,|;\\s*q=(?:0\\.|1))@',
+ $ae,
+ $m
+ )) {
return array('compress', $m[1]);
}
diff --git a/admin/survey/minify/lib/Minify.php b/admin/survey/minify/lib/Minify.php
index b01a2b9..047d9ed 100644
--- a/admin/survey/minify/lib/Minify.php
+++ b/admin/survey/minify/lib/Minify.php
@@ -242,7 +242,7 @@ class Minify
if (! $this->options['quiet']) {
$this->errorExit($this->options['badRequestHeader'], self::URL_DEBUG);
} else {
- list(,$statusCode) = explode(' ', $this->options['badRequestHeader']);
+ list(, $statusCode) = explode(' ', $this->options['badRequestHeader']);
return array(
'success' => false,
@@ -470,7 +470,7 @@ class Minify
public function errorExit($header, $url = '', $msgHtml = '')
{
$url = htmlspecialchars($url, ENT_QUOTES);
- list(,$h1) = explode(' ', $header, 2);
+ list(, $h1) = explode(' ', $header, 2);
$h1 = htmlspecialchars($h1);
// FastCGI environments require 3rd arg to header() to be set
list(, $code) = explode(' ', $header, 3);
@@ -593,7 +593,8 @@ class Minify
! $source // yes, we ran out of sources
|| $type === self::TYPE_CSS // yes, to process CSS individually (avoiding PCRE bugs/limits)
|| $minifier !== $lastMinifier // yes, minifier changed
- || $options !== $lastOptions)) { // yes, options changed
+ || $options !== $lastOptions // yes, options changed
+ )) {
// minify previous sources with last settings
$imploded = implode($implodeSeparator, $groupToProcessTogether);
$groupToProcessTogether = array();
diff --git a/admin/survey/minify/lib/Minify/App.php b/admin/survey/minify/lib/Minify/App.php
index 5ddb3e9..1270672 100644
--- a/admin/survey/minify/lib/Minify/App.php
+++ b/admin/survey/minify/lib/Minify/App.php
@@ -80,6 +80,12 @@ class App extends Container
};
$varNames = array_map($prefixer, $propNames);
+ $varDefined = get_defined_vars();
+
+ $varNames = array_filter($varNames, function ($name) use ($varDefined) {
+ return array_key_exists($name, $varDefined);
+ });
+
$vars = compact($varNames);
foreach ($varNames as $varName) {
diff --git a/admin/survey/minify/lib/Minify/CSSmin.php b/admin/survey/minify/lib/Minify/CSSmin.php
index dcde782..7fbcb68 100644
--- a/admin/survey/minify/lib/Minify/CSSmin.php
+++ b/admin/survey/minify/lib/Minify/CSSmin.php
@@ -73,16 +73,16 @@ class Minify_CSSmin
}
if ($options['currentDir']) {
return Minify_CSS_UriRewriter::rewrite(
- $css
- ,$options['currentDir']
- ,$options['docRoot']
- ,$options['symlinks']
+ $css,
+ $options['currentDir'],
+ $options['docRoot'],
+ $options['symlinks']
);
}
return Minify_CSS_UriRewriter::prepend(
- $css
- ,$options['prependRelativePath']
+ $css,
+ $options['prependRelativePath']
);
}
}
diff --git a/admin/survey/minify/lib/Minify/Cache/Null.php b/admin/survey/minify/lib/Minify/Cache/Null.php
index b6f6566..0c9183e 100644
--- a/admin/survey/minify/lib/Minify/Cache/Null.php
+++ b/admin/survey/minify/lib/Minify/Cache/Null.php
@@ -64,4 +64,4 @@ class Minify_Cache_Null implements Minify_CacheInterface
public function fetch($id)
{
}
-} \ No newline at end of file
+}
diff --git a/admin/survey/minify/lib/Minify/Cache/WinCache.php b/admin/survey/minify/lib/Minify/Cache/WinCache.php
index 089d66d..cec9cd8 100644
--- a/admin/survey/minify/lib/Minify/Cache/WinCache.php
+++ b/admin/survey/minify/lib/Minify/Cache/WinCache.php
@@ -136,4 +136,4 @@ class Minify_Cache_WinCache implements Minify_CacheInterface
return true;
}
-} \ No newline at end of file
+}
diff --git a/admin/survey/minify/lib/Minify/Controller/Files.php b/admin/survey/minify/lib/Minify/Controller/Files.php
index a9bb941..32d5a56 100644
--- a/admin/survey/minify/lib/Minify/Controller/Files.php
+++ b/admin/survey/minify/lib/Minify/Controller/Files.php
@@ -68,4 +68,3 @@ class Minify_Controller_Files extends Minify_Controller_Base
return new Minify_ServeConfiguration($options, $sources);
}
}
-
diff --git a/admin/survey/minify/lib/Minify/Controller/Groups.php b/admin/survey/minify/lib/Minify/Controller/Groups.php
index 6d4e5f4..521a58e 100644
--- a/admin/survey/minify/lib/Minify/Controller/Groups.php
+++ b/admin/survey/minify/lib/Minify/Controller/Groups.php
@@ -73,4 +73,3 @@ class Minify_Controller_Groups extends Minify_Controller_Files
return parent::createConfiguration($options);
}
}
-
diff --git a/admin/survey/minify/lib/Minify/Controller/Page.php b/admin/survey/minify/lib/Minify/Controller/Page.php
index 8ca00d5..3fa0ee3 100644
--- a/admin/survey/minify/lib/Minify/Controller/Page.php
+++ b/admin/survey/minify/lib/Minify/Controller/Page.php
@@ -66,4 +66,3 @@ class Minify_Controller_Page extends Minify_Controller_Base
return new Minify_ServeConfiguration($options, $sources, $selectionId);
}
}
-
diff --git a/admin/survey/minify/lib/Minify/ControllerInterface.php b/admin/survey/minify/lib/Minify/ControllerInterface.php
index d468635..dad19a9 100644
--- a/admin/survey/minify/lib/Minify/ControllerInterface.php
+++ b/admin/survey/minify/lib/Minify/ControllerInterface.php
@@ -19,4 +19,4 @@ interface Minify_ControllerInterface
* @return Minify_Env
*/
public function getEnv();
-} \ No newline at end of file
+}
diff --git a/admin/survey/minify/lib/Minify/HTML.php b/admin/survey/minify/lib/Minify/HTML.php
index 24b14ac..c5caad2 100644
--- a/admin/survey/minify/lib/Minify/HTML.php
+++ b/admin/survey/minify/lib/Minify/HTML.php
@@ -99,32 +99,34 @@ class Minify_HTML
// replace SCRIPTs (and minify) with placeholders
$this->_html = preg_replace_callback(
- '/(\\s*)<script(\\b[^>]*?>)([\\s\\S]*?)<\\/script>(\\s*)/iu'
- ,array($this, '_removeScriptCB')
- ,$this->_html);
+ '/(\\s*)<script(\\b[^>]*?>)([\\s\\S]*?)<\\/script>(\\s*)/iu',
+ array($this, '_removeScriptCB'),
+ $this->_html
+ );
// replace STYLEs (and minify) with placeholders
$this->_html = preg_replace_callback(
- '/\\s*<style(\\b[^>]*>)([\\s\\S]*?)<\\/style>\\s*/iu'
- ,array($this, '_removeStyleCB')
- ,$this->_html);
+ '/\\s*<style(\\b[^>]*>)([\\s\\S]*?)<\\/style>\\s*/iu',
+ array($this, '_removeStyleCB'),
+ $this->_html
+ );
// remove HTML comments (not containing IE conditional comments).
$this->_html = preg_replace_callback(
- '/<!--([\\s\\S]*?)-->/u'
- ,array($this, '_commentCB')
- ,$this->_html);
+ '/<!--([\\s\\S]*?)-->/u',
+ array($this, '_commentCB'),
+ $this->_html
+ );
// replace PREs with placeholders
- $this->_html = preg_replace_callback('/\\s*<pre(\\b[^>]*?>[\\s\\S]*?<\\/pre>)\\s*/iu'
- ,array($this, '_removePreCB')
- ,$this->_html);
+ $this->_html = preg_replace_callback('/\\s*<pre(\\b[^>]*?>[\\s\\S]*?<\\/pre>)\\s*/iu', array($this, '_removePreCB'), $this->_html);
// replace TEXTAREAs with placeholders
$this->_html = preg_replace_callback(
- '/\\s*<textarea(\\b[^>]*?>[\\s\\S]*?<\\/textarea>)\\s*/iu'
- ,array($this, '_removeTextareaCB')
- ,$this->_html);
+ '/\\s*<textarea(\\b[^>]*?>[\\s\\S]*?<\\/textarea>)\\s*/iu',
+ array($this, '_removeTextareaCB'),
+ $this->_html
+ );
// trim each line.
// @todo take into account attribute values that span multiple lines.
@@ -139,24 +141,25 @@ class Minify_HTML
// remove ws outside of all elements
$this->_html = preg_replace(
- '/>(\\s(?:\\s*))?([^<]+)(\\s(?:\s*))?</u'
- ,'>$1$2$3<'
- ,$this->_html);
+ '/>(\\s(?:\\s*))?([^<]+)(\\s(?:\s*))?</u',
+ '>$1$2$3<',
+ $this->_html
+ );
// use newlines before 1st attribute in open tags (to limit line lengths)
$this->_html = preg_replace('/(<[a-z\\-]+)\\s+([^>]+>)/iu', "$1\n$2", $this->_html);
// fill placeholders
$this->_html = str_replace(
- array_keys($this->_placeholders)
- ,array_values($this->_placeholders)
- ,$this->_html
+ array_keys($this->_placeholders),
+ array_values($this->_placeholders),
+ $this->_html
);
// issue 229: multi-pass to catch scripts that didn't get replaced in textareas
$this->_html = str_replace(
- array_keys($this->_placeholders)
- ,array_values($this->_placeholders)
- ,$this->_html
+ array_keys($this->_placeholders),
+ array_values($this->_placeholders),
+ $this->_html
);
return $this->_html;
@@ -164,7 +167,7 @@ class Minify_HTML
protected function _commentCB($m)
{
- return (0 === strpos($m[1], '[') || false !== strpos($m[1], '<!['))
+ return (0 === strpos($m[1], '[') || false !== strpos($m[1], '<![') || 0 === strpos($m[1], '#'))
? $m[0]
: '';
}
@@ -209,7 +212,8 @@ class Minify_HTML
: 'trim';
$css = call_user_func($minifier, $css);
- return $this->_reservePlace($this->_needsCdata($css)
+ return $this->_reservePlace(
+ $this->_needsCdata($css)
? "{$openStyle}/*<![CDATA[*/{$css}/*]]>*/</style>"
: "{$openStyle}{$css}</style>"
);
@@ -238,7 +242,8 @@ class Minify_HTML
: 'trim';
$js = call_user_func($minifier, $js);
- return $this->_reservePlace($this->_needsCdata($js)
+ return $this->_reservePlace(
+ $this->_needsCdata($js)
? "{$ws1}{$openScript}/*<![CDATA[*/{$js}/*]]>*/</script>{$ws2}"
: "{$ws1}{$openScript}{$js}</script>{$ws2}"
);
diff --git a/admin/survey/minify/lib/Minify/ImportProcessor.php b/admin/survey/minify/lib/Minify/ImportProcessor.php
index 0f8c981..57c22e8 100644
--- a/admin/survey/minify/lib/Minify/ImportProcessor.php
+++ b/admin/survey/minify/lib/Minify/ImportProcessor.php
@@ -66,7 +66,7 @@ class Minify_ImportProcessor
$this->_currentDir = dirname($file);
// remove UTF-8 BOM if present
- if (pack("CCC",0xef,0xbb,0xbf) === substr($content, 0, 3)) {
+ if (pack("CCC", 0xef, 0xbb, 0xbf) === substr($content, 0, 3)) {
$content = substr($content, 3);
}
// ensure uniform EOLs
@@ -182,7 +182,7 @@ class Minify_ImportProcessor
private function truepath($path)
{
// whether $path is unix or not
- $unipath = ('' === $path) || ($path{0} !== '/');
+ $unipath = ('' === $path) || ($path[0] !== '/');
// attempts to detect if path is relative in which case, add cwd
if (strpos($path, ':') === false && $unipath) {
diff --git a/admin/survey/minify/lib/Minify/JS/ClosureCompiler.php b/admin/survey/minify/lib/Minify/JS/ClosureCompiler.php
index 05e2e33..63f7b90 100644
--- a/admin/survey/minify/lib/Minify/JS/ClosureCompiler.php
+++ b/admin/survey/minify/lib/Minify/JS/ClosureCompiler.php
@@ -195,13 +195,13 @@ class Minify_JS_ClosureCompiler
curl_close($ch);
} else {
throw new Minify_JS_ClosureCompiler_Exception(
- "Could not make HTTP request: allow_url_open is false and cURL not available"
+ "Could not make HTTP request: allow_url_open is false and cURL not available"
);
}
if (false === $contents) {
throw new Minify_JS_ClosureCompiler_Exception(
- "No HTTP response from server"
+ "No HTTP response from server"
);
}
diff --git a/admin/survey/minify/lib/Minify/NailgunClosureCompiler.php b/admin/survey/minify/lib/Minify/NailgunClosureCompiler.php
index 683e30f..516cc5e 100644
--- a/admin/survey/minify/lib/Minify/NailgunClosureCompiler.php
+++ b/admin/survey/minify/lib/Minify/NailgunClosureCompiler.php
@@ -110,4 +110,4 @@ class Minify_NailgunClosureCompiler extends Minify_ClosureCompiler
$this->shell("$serverCommand </dev/null >/dev/null 2>/dev/null & sleep 10");
}
-} \ No newline at end of file
+}
diff --git a/admin/survey/minify/lib/Minify/Source/Factory.php b/admin/survey/minify/lib/Minify/Source/Factory.php
index 4371931..a817417 100644
--- a/admin/survey/minify/lib/Minify/Source/Factory.php
+++ b/admin/survey/minify/lib/Minify/Source/Factory.php
@@ -170,7 +170,7 @@ class Minify_Source_Factory
if ($this->options['noMinPattern'] && preg_match($this->options['noMinPattern'], $basename)) {
if (preg_match('~\.(css|less)$~i', $basename)) {
$spec['minifyOptions']['compress'] = false;
- // we still want URI rewriting to work for CSS
+ // we still want URI rewriting to work for CSS
} else {
$spec['minifier'] = 'Minify::nullMinifier';
}
diff --git a/admin/survey/minify/lib/Minify/YUICompressor.php b/admin/survey/minify/lib/Minify/YUICompressor.php
index 40fd02c..3d14f41 100644
--- a/admin/survey/minify/lib/Minify/YUICompressor.php
+++ b/admin/survey/minify/lib/Minify/YUICompressor.php
@@ -154,4 +154,3 @@ class Minify_YUICompressor
}
}
}
-
diff --git a/admin/survey/minify/lib/MrClay/Cli.php b/admin/survey/minify/lib/MrClay/Cli.php
index 4622b14..1f9b7ea 100644
--- a/admin/survey/minify/lib/MrClay/Cli.php
+++ b/admin/survey/minify/lib/MrClay/Cli.php
@@ -390,4 +390,3 @@ class Cli
$this->errors[$letter][] = sprintf($msg, $value);
}
}
-
diff --git a/admin/survey/minify/phpunit.xml b/admin/survey/minify/phpunit.xml
index 285c66f..5a96b1e 100644
--- a/admin/survey/minify/phpunit.xml
+++ b/admin/survey/minify/phpunit.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- http://phpunit.de/manual/current/en/appendixes.configuration.html -->
+<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit
backupGlobals="false"
backupStaticAttributes="false"
@@ -10,7 +10,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="false"
bootstrap="vendor/autoload.php">
<testsuites>
@@ -32,6 +31,7 @@
<directory>.</directory>
<exclude>
<directory>tests</directory>
+ <directory>vendor</directory>
</exclude>
</whitelist>
</filter>
diff --git a/admin/survey/minify/server-info.php b/admin/survey/minify/server-info.php
index 0b1ada7..37a31c9 100644
--- a/admin/survey/minify/server-info.php
+++ b/admin/survey/minify/server-info.php
@@ -13,7 +13,8 @@ if (!$enabled) {
die('Set $enabled to true to see server info.');
}
-function assertTrue($test, $message) {
+function assertTrue($test, $message)
+{
if (!$test) {
echo "Warning: $message\n";
}
diff --git a/admin/survey/minify/static/.htaccess b/admin/survey/minify/static/.htaccess
index f9cc303..36927be 100644
--- a/admin/survey/minify/static/.htaccess
+++ b/admin/survey/minify/static/.htaccess
@@ -1,40 +1,40 @@
-<IfModule mod_expires.c>
- ExpiresActive On
- ExpiresDefault "access plus 1 year"
-</IfModule>
-
-<FilesMatch "\.(js|css|less)$">
- FileETag MTime Size
-</FilesMatch>
-
-<IfModule mod_gzip.c>
- mod_gzip_on yes
- mod_gzip_dechunk yes
- mod_gzip_keep_workfiles No
- mod_gzip_minimum_file_size 1000
- mod_gzip_maximum_file_size 1000000
- mod_gzip_maximum_inmem_size 1000000
- mod_gzip_item_include mime ^text/.*
- mod_gzip_item_include mime ^application/javascript$
- mod_gzip_item_include mime ^application/x-javascript$
- # Exclude old browsers and images since IE has trouble with this
- mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
- mod_gzip_item_exclude mime ^image/.*
-</IfModule>
-
-<IfModule mod_deflate.c>
- AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
- BrowserMatch ^Mozilla/4 gzip-only-text/html
- BrowserMatch ^Mozilla/4\.[0678] no-gzip
- BrowserMatch \bMSIE !no-gzip
-</IfModule>
-
-<IfModule mod_rewrite.c>
-RewriteEngine on
-
-# You may need RewriteBase on some servers
-#RewriteBase /min/static
-
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule ^(.*)$ gen.php [QSA,L]
-</IfModule>
+<IfModule mod_expires.c>
+ ExpiresActive On
+ ExpiresDefault "access plus 1 year"
+</IfModule>
+
+<FilesMatch "\.(js|css|less)$">
+ FileETag MTime Size
+</FilesMatch>
+
+<IfModule mod_gzip.c>
+ mod_gzip_on yes
+ mod_gzip_dechunk yes
+ mod_gzip_keep_workfiles No
+ mod_gzip_minimum_file_size 1000
+ mod_gzip_maximum_file_size 1000000
+ mod_gzip_maximum_inmem_size 1000000
+ mod_gzip_item_include mime ^text/.*
+ mod_gzip_item_include mime ^application/javascript$
+ mod_gzip_item_include mime ^application/x-javascript$
+ # Exclude old browsers and images since IE has trouble with this
+ mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
+ mod_gzip_item_exclude mime ^image/.*
+</IfModule>
+
+<IfModule mod_deflate.c>
+ AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
+ BrowserMatch ^Mozilla/4 gzip-only-text/html
+ BrowserMatch ^Mozilla/4\.[0678] no-gzip
+ BrowserMatch \bMSIE !no-gzip
+</IfModule>
+
+<IfModule mod_rewrite.c>
+RewriteEngine on
+
+# You may need RewriteBase on some servers
+#RewriteBase /min/static
+
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^(.*)$ gen.php [QSA,L]
+</IfModule>
diff --git a/admin/survey/minify/static/gen.php b/admin/survey/minify/static/gen.php
index 2bc40af..5ec84a5 100644
--- a/admin/survey/minify/static/gen.php
+++ b/admin/survey/minify/static/gen.php
@@ -7,12 +7,12 @@ if (is_file(__DIR__ . '/bootstrap.php')) {
$bootstrap_file = __DIR__ . '/../bootstrap.php';
}
-$send_400 = function($content = 'Bad URL') {
+$send_400 = function ($content = 'Bad URL') {
http_response_code(400);
die($content);
};
-$send_301 = function($url) {
+$send_301 = function ($url) {
http_response_code(301);
header("Cache-Control: max-age=31536000");
header("Location: $url");
diff --git a/admin/survey/minify/static/lib.php b/admin/survey/minify/static/lib.php
index 32c6df5..3cd02d6 100644
--- a/admin/survey/minify/static/lib.php
+++ b/admin/survey/minify/static/lib.php
@@ -10,7 +10,8 @@ namespace Minify\StaticService;
* @param string $type "css" or "js"
* @return string
*/
-function build_uri($static_uri, $query, $type) {
+function build_uri($static_uri, $query, $type)
+{
$static_uri = rtrim($static_uri, '/');
$query = ltrim($query, '?');
@@ -30,7 +31,8 @@ function build_uri($static_uri, $query, $type) {
* @param bool $auto_create Automatically create the directory if missing?
* @return null|string null if missing or can't create
*/
-function get_cache_time($auto_create = true) {
+function get_cache_time($auto_create = true)
+{
foreach (scandir(__DIR__) as $entry) {
if (ctype_digit($entry)) {
return $entry;
@@ -50,14 +52,16 @@ function get_cache_time($auto_create = true) {
return $time;
}
-function flush_cache() {
+function flush_cache()
+{
$time = get_cache_time(false);
if ($time) {
remove_tree(__DIR__ . "/$time");
}
}
-function remove_tree($dir) {
+function remove_tree($dir)
+{
$files = array_diff(scandir($dir), array('.', '..'));
foreach ($files as $file) {
diff --git a/admin/survey/minify/utils.php b/admin/survey/minify/utils.php
index 983cde5..36d992c 100644
--- a/admin/survey/minify/utils.php
+++ b/admin/survey/minify/utils.php
@@ -48,7 +48,7 @@ function Minify_getUri($keyOrFiles, $opts = array())
*
* Since this makes a bunch of stat() calls, you might not want to check this
* on every request.
- *
+ *
* @param array $keysAndFiles group keys and/or file paths/URIs.
* @return int latest modification time of all given keys/files
*/