diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-04-14 17:03:12 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-04-14 17:03:12 +1000 |
| commit | 1bd14ef1d2d4183757681f5b586abce91e3c4a5f (patch) | |
| tree | 34b31ee0319ae65458b8fd0d1c92fbf4e72218ec /inc/functions.php | |
| parent | 30f0145ea04f16715e5f61c08029e51c0cdc49fe (diff) | |
rebuild themes
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/inc/functions.php b/inc/functions.php index 144cdec1..fd00dc9f 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -101,6 +101,16 @@ return $theme; } + function rebuildTheme() { + $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()); + } + } + function themeSettings() { $query = query("SELECT * FROM `theme_settings`") or error(db_error()); $settings = Array(); |
