1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-29 10:38:08 +01:00

Add admin logging to theme manager

This commit is contained in:
e107steved 2008-11-02 10:28:30 +00:00
parent 5d06784682
commit 97a3154215
2 changed files with 26 additions and 6 deletions

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $
| $Revision: 1.10 $
| $Date: 2008-08-25 10:46:32 $
| $Revision: 1.11 $
| $Date: 2008-11-02 10:28:25 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@ -448,6 +448,7 @@ class themeHandler{
$pref['themecss'] ='style.css';
$e107cache->clear_sys();
save_prefs();
$this->theme_adminlog('01',$pref['sitetheme'].', '.$pref['themecss']);
$ns->tablerender("Admin Message", "<br /><div style='text-align:center;'>".TPVLAN_3." <b>'".$themeArray[$this -> id]."'</b>.</div><br />");
}
@ -459,6 +460,7 @@ class themeHandler{
$pref['admincss'] = file_exists(THEME.'admin_style.css') ? 'admin_style.css' : 'style.css';
$e107cache->clear_sys();
save_prefs();
$this->theme_adminlog('02',$pref['admintheme'].', '.$pref['admincss']);
$ns->tablerender("Admin Message", "<br /><div style='text-align:center;'>".TPVLAN_40." <b>'".$themeArray[$this -> id]."'</b>.</div><br />");
}
@ -469,6 +471,7 @@ class themeHandler{
$pref['image_preload'] = $_POST['image_preload'];
$e107cache->clear_sys();
save_prefs();
$this->theme_adminlog('03',$pref['image_preload'].', '.$pref['themecss']);
$ns->tablerender(TPVLAN_36, "<br /><div style='text-align:center;'>".TPVLAN_37.".</div><br />");
}
@ -479,8 +482,18 @@ class themeHandler{
$pref['adminstyle'] = $_POST['adminstyle'];
$e107cache->clear_sys();
save_prefs();
$this->theme_adminlog('04',$pref['adminstyle'].', '.$pref['admincss']);
$ns->tablerender(TPVLAN_36, "<br /><div style='text-align:center;'>".TPVLAN_43.".</div><br />");
}
// Log event to admin log
function theme_adminlog($msg_num='00', $woffle='')
{
global $pref, $admin_log;
// if (!varset($pref['admin_log_log']['admin_banlist'],0)) return;
$admin_log->log_event('THEME_'.$msg_num,$woffle,E_LOG_INFORMATIVE,'');
}
}
?>

View File

@ -1,6 +1,6 @@
<?php
// e107 Language File.
// $Id: lan_log_messages.php,v 1.16 2008-11-02 10:15:37 e107steved Exp $
// $Id: lan_log_messages.php,v 1.17 2008-11-02 10:28:30 e107steved Exp $
/*
The definitions in this file are for standard 'explanatory' messages which might be entered
@ -156,9 +156,16 @@ define('LAN_AL_SLINKS_05','Sitelinks options updated');
define('LAN_AL_SLINKS_06','Sitelink deleted');
define('LAN_AL_SLINKS_07','Sitelink submitted');
define('LAN_AL_SLINKS_08','Sitelink updated');
define('LAN_AL_SLINKS_09','');
define('LAN_AL_SLINKS_10','');
define('LAN_AL_SLINKS_11','');
// Theme manager routines
//-----------------------
define('LAN_AL_THEME_00','Unknown theme-related message');
define('LAN_AL_THEME_01','Site theme updated');
define('LAN_AL_THEME_02','Admin theme updated');
define('LAN_AL_THEME_03','Image preload/site CSS updated');
define('LAN_AL_THEME_04','Admin style/CSS updated');
define('LAN_AL_THEME_05','');
?>