diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index accaf2853..01196d5df 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -126,6 +126,7 @@ class themeHandler { $this->id = $_POST['curTheme']; + $this->setLayouts(); // Update the layouts in case they have been manually changed. $this->SetCustomPages($_POST['custompages']); $this->setStyle(); @@ -1719,6 +1720,20 @@ class themeHandler e107::getConfig()->set('sitetheme_custompages', e107::getParser()->toDB($newprefs)); } + /** + * Set the Theme layouts, as found in theme.xml + */ + function setLayouts($name='') + { + $name = $this->id; + $layout = is_array($this->themeArray[$name]['layouts']) ? $this->themeArray[$name]['layouts'] : array(); + + e107::getConfig()->set('sitetheme_layouts', $layout); + + } + + + // Log event to admin log function theme_adminlog($msg_num = '00', $woffle = '')