summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-06-07 15:21:54 +1000
committerSavetheinternet <savetheinternet@tinyboard.org>2011-06-07 15:21:54 +1000
commit8baf6ca1245fd02c227c183e04c836b69235b9f7 (patch)
treeacaaae88f46fca4e47aca34fd21a74a222d24c9f /inc
parent922409e323cb0ae6f528c23eb6744776da37f6d1 (diff)
general themes stuff
Diffstat (limited to 'inc')
-rw-r--r--inc/functions.php25
1 files changed, 14 insertions, 11 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 790e0783..e13008e5 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -151,22 +151,25 @@
return $theme;
}
+ function rebuildTheme($theme, $action) {
+ global $config, $_theme;
+ $_theme = $theme;
+
+ $theme = loadThemeConfig($_theme);
+
+ if(file_exists($config['dir']['themes'] . '/' . $_theme . '/theme.php')) {
+ require_once $config['dir']['themes'] . '/' . $_theme . '/theme.php';
+ $theme['build_function']($action, themeSettings($_theme));
+ }
+ }
+
function rebuildThemes($action) {
global $config, $_theme;
// List themes
$query = query("SELECT `theme` FROM `theme_settings` WHERE `name` IS NULL AND `value` IS NULL") or error(db_error());
while($theme = $query->fetch()) {
- // A theme is installed
- $_theme = &$theme['theme'];
-
- $theme = loadThemeConfig($_theme);
-
- if(file_exists($config['dir']['themes'] . '/' . $_theme . '/theme.php')) {
- require_once $config['dir']['themes'] . '/' . $_theme . '/theme.php';
- $theme['build_function']($action, themeSettings($_theme));
- }
-
+ rebuildTheme($theme['theme']);
}
}
@@ -1446,7 +1449,7 @@
else
$trip = '!!' . substr ( crypt ( $trip, $config['secure_trip_salt'] ), ( -1 * $length ) );
} else {
- // insecure
+ // insecure
if(isset($config['custom_tripcode']["#{$trip}"]))
$trip = $config['custom_tripcode']["#{$trip}"];
else