mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Add admin logging to cache
This commit is contained in:
@@ -11,13 +11,14 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/cache.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/cache.php,v $
|
||||||
| $Revision: 1.3 $
|
| $Revision: 1.4 $
|
||||||
| $Date: 2008-01-10 03:25:00 $
|
| $Date: 2008-11-02 11:04:29 $
|
||||||
| $Author: e107coders $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
require_once("../class2.php");
|
require_once("../class2.php");
|
||||||
if (!getperms("C")) {
|
if (!getperms("C"))
|
||||||
|
{
|
||||||
header("location:".e_BASE."index.php");
|
header("location:".e_BASE."index.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -25,7 +26,8 @@ $e_sub_cat = 'cache';
|
|||||||
require_once("auth.php");
|
require_once("auth.php");
|
||||||
require_once(e_HANDLER."cache_handler.php");
|
require_once(e_HANDLER."cache_handler.php");
|
||||||
$ec = new ecache;
|
$ec = new ecache;
|
||||||
if ($pref['cachestatus'] == '2') {
|
if ($pref['cachestatus'] == '2')
|
||||||
|
{
|
||||||
$pref['cachestatus'] = '1';
|
$pref['cachestatus'] = '1';
|
||||||
save_prefs();
|
save_prefs();
|
||||||
}
|
}
|
||||||
@@ -44,6 +46,7 @@ if (isset($_POST['submit_cache']))
|
|||||||
$pref['cachestatus'] = $_POST['cachestatus'];
|
$pref['cachestatus'] = $_POST['cachestatus'];
|
||||||
$pref['syscachestatus'] = $_POST['syscachestatus'];
|
$pref['syscachestatus'] = $_POST['syscachestatus'];
|
||||||
save_prefs();
|
save_prefs();
|
||||||
|
$admin_log->log_event('CACHE_01',$pref['syscachestatus'].', '.$pref['cachestatus'],E_LOG_INFORMATIVE,'');
|
||||||
$ec->clear();
|
$ec->clear();
|
||||||
$ec->clear_sys();
|
$ec->clear_sys();
|
||||||
$update = true;
|
$update = true;
|
||||||
@@ -51,15 +54,21 @@ if (isset($_POST['submit_cache']))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['empty_syscache'])) {
|
if (isset($_POST['empty_syscache']))
|
||||||
|
{
|
||||||
$ec->clear_sys();
|
$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>");
|
$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();
|
$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>");
|
$ns->tablerender(LAN_UPDATE, "<div style='text-align:center'><b>".CACLAN_6."</b></div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$syscache_files = glob($e107->file_path.$FILES_DIRECTORY."cache/S_*.*");
|
$syscache_files = glob($e107->file_path.$FILES_DIRECTORY."cache/S_*.*");
|
||||||
$cache_files = glob($e107->file_path.$FILES_DIRECTORY."cache/C_*.*");
|
$cache_files = glob($e107->file_path.$FILES_DIRECTORY."cache/C_*.*");
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
// e107 Language File.
|
// 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
|
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','');
|
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','');
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user