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