1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-21 13:11:52 +02:00

Add admin logging to cache

This commit is contained in:
e107steved 2008-11-02 11:04:34 +00:00
parent 97a3154215
commit 38f0c55a2a
2 changed files with 26 additions and 8 deletions

View File

@ -11,13 +11,14 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/cache.php,v $
| $Revision: 1.3 $
| $Date: 2008-01-10 03:25:00 $
| $Author: e107coders $
| $Revision: 1.4 $
| $Date: 2008-11-02 11:04:29 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
if (!getperms("C")) {
if (!getperms("C"))
{
header("location:".e_BASE."index.php");
exit;
}
@ -25,7 +26,8 @@ $e_sub_cat = 'cache';
require_once("auth.php");
require_once(e_HANDLER."cache_handler.php");
$ec = new ecache;
if ($pref['cachestatus'] == '2') {
if ($pref['cachestatus'] == '2')
{
$pref['cachestatus'] = '1';
save_prefs();
}
@ -44,6 +46,7 @@ if (isset($_POST['submit_cache']))
$pref['cachestatus'] = $_POST['cachestatus'];
$pref['syscachestatus'] = $_POST['syscachestatus'];
save_prefs();
$admin_log->log_event('CACHE_01',$pref['syscachestatus'].', '.$pref['cachestatus'],E_LOG_INFORMATIVE,'');
$ec->clear();
$ec->clear_sys();
$update = true;
@ -51,15 +54,21 @@ if (isset($_POST['submit_cache']))
}
}
if (isset($_POST['empty_syscache'])) {
if (isset($_POST['empty_syscache']))
{
$ec->clear_sys();
$admin_log->log_event('CACHE_02',$pref['syscachestatus'].', '.$pref['cachestatus'],E_LOG_INFORMATIVE,'');
$ns->tablerender(LAN_UPDATE, "<div style='text-align:center'><b>".CACLAN_15."</b></div>");
}
if (isset($_POST['empty_cache'])) {
if (isset($_POST['empty_cache']))
{
$ec->clear();
$admin_log->log_event('CACHE_03',$pref['syscachestatus'].', '.$pref['cachestatus'],E_LOG_INFORMATIVE,'');
$ns->tablerender(LAN_UPDATE, "<div style='text-align:center'><b>".CACLAN_6."</b></div>");
}
$syscache_files = glob($e107->file_path.$FILES_DIRECTORY."cache/S_*.*");
$cache_files = glob($e107->file_path.$FILES_DIRECTORY."cache/C_*.*");

View File

@ -1,6 +1,6 @@
<?php
// e107 Language File.
// $Id: lan_log_messages.php,v 1.17 2008-11-02 10:28:30 e107steved Exp $
// $Id: lan_log_messages.php,v 1.18 2008-11-02 11:04:34 e107steved Exp $
/*
The definitions in this file are for standard 'explanatory' messages which might be entered
@ -168,4 +168,13 @@ define('LAN_AL_THEME_04','Admin style/CSS updated');
define('LAN_AL_THEME_05','');
// Cache control routines
//-----------------------
define('LAN_AL_CACHE_00','Unknown cache-control message');
define('LAN_AL_CACHE_01','Cache settings updated');
define('LAN_AL_CACHE_02','System cache emptied');
define('LAN_AL_CACHE_03','Content cache emptied');
define('LAN_AL_CACHE_04','');
?>