summaryrefslogtreecommitdiff
path: root/src/index.php
diff options
context:
space:
mode:
authorJonas Kohl2024-09-16 23:13:07 +0200
committerJonas Kohl2024-09-16 23:13:07 +0200
commite79ec21fc8c03262ca4e16b68c08705495b7d2e5 (patch)
tree0a550efa99577c52e23f19213ac4dcbd0ff044c8 /src/index.php
parentf2a5f45355b83540dbb42b3a198a20ec354e0422 (diff)
Theme stuff
Diffstat (limited to 'src/index.php')
-rw-r--r--src/index.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/index.php b/src/index.php
index fac57a5..1807608 100644
--- a/src/index.php
+++ b/src/index.php
@@ -1115,6 +1115,14 @@ if ($_action === "auth") {
} elseif ($_action === "ji18n") {
header("Content-Type: application/javascript; charset=UTF-8");
echo 'var I18N_MESSAGES = ' . json_encode(i18n_get_message_store(i18n_get_current_locale()), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . ";\n";
+} elseif ($_action === "debug/list-themes") {
+ header("Content-Type: text/plain");
+ foreach (scandir($dir = __DIR__ . '/themes/') as $ent) {
+ if ($ent[0] === "." || !is_dir($dir . "/" . $ent) || !is_file($theme_file = $dir . "/" . $ent . "/theme.json"))
+ continue;
+ $theme_info = json_decode(file_get_contents($theme_file));
+ echo $ent . "\t" . $theme_info->name . "\n";
+ }
} elseif ($_action === "ctheme") {
// options
$enableLogging = true;