summaryrefslogtreecommitdiff
path: root/app/functions.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2019-07-25 19:23:30 -0700
committerFrédéric Guillot <fred@kanboard.net>2019-07-25 19:23:30 -0700
commit8c396287ac871c1a5aaf0a4bc608df101f677d1d (patch)
tree4c96460e20c34c646595d0b3e09a00b086551534 /app/functions.php
parentd42dd0705481bacf38c8d2a6c915398046ead014 (diff)
Improve assets management
Diffstat (limited to 'app/functions.php')
-rw-r--r--app/functions.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/functions.php b/app/functions.php
index fc278029..ada96d97 100644
--- a/app/functions.php
+++ b/app/functions.php
@@ -2,6 +2,28 @@
use Kanboard\Core\Translator;
+function concat_files(array $files)
+{
+ $data = '';
+ foreach ($files as $pattern) {
+ foreach (glob($pattern) as $filename) {
+ echo $filename.PHP_EOL;
+ if (! file_exists($filename)) {
+ die("$filename not found\n");
+ }
+
+ $contents = file_get_contents($filename);
+ if ($contents === false) {
+ die("Unable to read $filename\n");
+ }
+
+ $data .= $contents;
+ }
+ }
+
+ return $data;
+}
+
function session_get($key)
{
return isset($_SESSION[$key]) ? $_SESSION[$key] : null;