summaryrefslogtreecommitdiffstats
path: root/admin/survey/minify/static/lib.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/survey/minify/static/lib.php12
1 files changed, 8 insertions, 4 deletions
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) {