rebuild themes

This commit is contained in:
Savetheinternet 2011-04-14 17:03:12 +10:00
parent 30f0145ea0
commit 1bd14ef1d2
2 changed files with 19 additions and 2 deletions

View file

@ -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();