general themes stuff

This commit is contained in:
Savetheinternet 2011-06-07 15:21:54 +10:00
parent 922409e323
commit 8baf6ca124

View File

@ -151,14 +151,9 @@
return $theme; return $theme;
} }
function rebuildThemes($action) { function rebuildTheme($theme, $action) {
global $config, $_theme; global $config, $_theme;
$_theme = $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); $theme = loadThemeConfig($_theme);
@ -166,7 +161,15 @@
require_once $config['dir']['themes'] . '/' . $_theme . '/theme.php'; require_once $config['dir']['themes'] . '/' . $_theme . '/theme.php';
$theme['build_function']($action, themeSettings($_theme)); $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()) {
rebuildTheme($theme['theme']);
} }
} }