mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Fixes #2331 - themecss pref was being deleted when saving theme prefs.
This commit is contained in:
@@ -2495,24 +2495,32 @@ class themeHandler
|
|||||||
// $ns->tablerender("Admin Message", "<br /><div style='text-align:center;'>".TPVLAN_40." <b>'".$themeArray[$this -> id]."'</b>.</div><br />");
|
// $ns->tablerender("Admin Message", "<br /><div style='text-align:center;'>".TPVLAN_40." <b>'".$themeArray[$this -> id]."'</b>.</div><br />");
|
||||||
// $this->showThemes('admin');
|
// $this->showThemes('admin');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @todo add admin log
|
||||||
|
*/
|
||||||
function setStyle()
|
function setStyle()
|
||||||
{
|
{
|
||||||
global $pref,$e107cache;
|
global $pref,$e107cache;
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$ns = e107::getRender();
|
$ns = e107::getRender();
|
||||||
$mes = e107::getMessage();
|
$mes = e107::getMessage();
|
||||||
|
|
||||||
//TODO adminlog
|
$themeCSS = vartrue($_POST['themecss'],'style.css');
|
||||||
e107::getConfig()->setPosted('themecss', $_POST['themecss'])->setPosted('sitetheme_deflayout', $_POST['layout_default']);
|
$themeLayout = vartrue($_POST['layout_default'], 'default');
|
||||||
|
|
||||||
|
e107::getConfig()->setPosted('themecss',$themeCSS)->setPosted('sitetheme_deflayout', $themeLayout);
|
||||||
|
|
||||||
$msg = $this->setThemeConfig();
|
$msg = $this->setThemeConfig();
|
||||||
|
|
||||||
if($msg)
|
if($msg)
|
||||||
{
|
{
|
||||||
$mes->add(TPVLAN_37, E_MESSAGE_SUCCESS);
|
$mes->add(TPVLAN_37, E_MESSAGE_SUCCESS);
|
||||||
if(is_array($msg))
|
if(is_array($msg))
|
||||||
$mes->add($msg[0], $msg[1]);
|
$mes->add($msg[0], $msg[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAdminStyle()
|
function setAdminStyle()
|
||||||
|
Reference in New Issue
Block a user