mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-12-01 18:47:20 +01:00
general themes stuff
This commit is contained in:
parent
88ec10c6aa
commit
7705bf525f
@ -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']);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user