summaryrefslogtreecommitdiff
path: root/mod.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-10-11 02:37:07 +1100
committerSavetheinternet <savetheinternet@tinyboard.org>2011-10-11 02:37:07 +1100
commiteabed0199b031f16848234ab5874f7fcea96ecfe (patch)
tree82adfffad658e9f2d25b56258c8a91a86a377598 /mod.php
parent65117f2a22aecd2a0107a2d56b5ec86e8664334a (diff)
Fetch current theme settings for "reconfigure"
Diffstat (limited to 'mod.php')
-rw-r--r--mod.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/mod.php b/mod.php
index e3f7cc9b..b0b4ac40 100644
--- a/mod.php
+++ b/mod.php
@@ -422,6 +422,8 @@
if(!isset($theme['config']) || empty($theme['config'])) {
$body .= '<p style="text-align:center" class="unimportant">(No configuration required.)</p>';
} else {
+ $settings = themeSettings($_theme);
+
$body .= '<table>';
foreach($theme['config'] as &$c) {
$body .= '<tr><th>' . $c['title'] . '</th><td>';
@@ -429,7 +431,13 @@
case 'text':
default:
$body .= '<input type="text" name="' . utf8tohtml($c['name']) . '" ' .
- (isset($c['default']) ? 'value="' . utf8tohtml($c['default']) . '" ' :'') .
+ (isset($settings[$c['name']]) ?
+ ' value="' . utf8tohtml($settings[$c['name']]) . '" '
+ :
+ (isset($c['default']) ?
+ 'value="' . utf8tohtml($c['default']) . '" '
+ : '')
+ ) .
(isset($c['size']) ? 'size="' . (int)$c['size'] . '" ' :'') .
'/>';
}