summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-04-14 20:43:34 +1000
committerSavetheinternet <savetheinternet@n0v4.com>2011-04-14 20:43:34 +1000
commit641f925dfebf2540a6d7e94e23e302c4a30dc58b (patch)
treef40d984c1de2fb914f64ee5e209aee2b1aed81d6 /inc/functions.php
parent757b09dec938c541dc5c858474b07c47b25248dc (diff)
better rebuilding system for themes
Diffstat (limited to 'inc/functions.php')
-rw-r--r--inc/functions.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/inc/functions.php b/inc/functions.php
index b90abe1b..cec25137 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -104,13 +104,13 @@
return $theme;
}
- function rebuildTheme() {
+ function rebuildTheme($action) {
$query = query("SELECT `value` AS `theme` FROM `theme_settings` WHERE `name` = 'theme'") or error(db_error());
if($theme = $query->fetch()) {
// A theme is installed
$theme = loadThemeConfig($theme['theme']);
- $theme['build_function'](themeSettings());
+ $theme['build_function']($action, themeSettings());
}
}
@@ -799,10 +799,16 @@
$content .= '<div style="display:none"><input type="text" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" /></div>';
break;
case 6:
- $content .= '<textarea style="display:none" name="' . htmlspecialchars($name) . '">' . htmlspecialchars($value) . '</textarea>';
+ if(!empty($value))
+ $content .= '<textarea style="display:none" name="' . htmlspecialchars($name) . '">' . htmlspecialchars($value) . '</textarea>';
+ else
+ $content .= '<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />';
break;
case 7:
- $content .= '<textarea name="' . htmlspecialchars($name) . '" style="display:none">' . htmlspecialchars($value) . '</textarea>';
+ if(!empty($value))
+ $content .= '<textarea name="' . htmlspecialchars($name) . '" style="display:none">' . htmlspecialchars($value) . '</textarea>';
+ else
+ $content .= '<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />';
break;
case 8:
$content .= '<div style="display:none"><textarea name="' . htmlspecialchars($name) . '" style="display:none">' . htmlspecialchars($value) . '</textarea></div>';