1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Re-scan Theme layouts for changes during pref-saving.

This commit is contained in:
Cameron
2013-12-19 22:50:01 -08:00
parent 146fc7d079
commit 791e62f85c

View File

@@ -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 = '')