summaryrefslogtreecommitdiff
path: root/app/functions.php
diff options
context:
space:
mode:
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;