mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 21:21:54 +02:00
Add admin logging to prefs
This commit is contained in:
parent
ea125d2657
commit
ef6540d265
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_admin/prefs.php,v $
|
||||
| $Revision: 1.15 $
|
||||
| $Date: 2008-06-29 16:40:31 $
|
||||
| $Revision: 1.16 $
|
||||
| $Date: 2008-08-17 15:18:05 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -21,17 +21,20 @@ include_once(e_HANDLER."userclass_class.php");
|
||||
include_once(e_HANDLER."user_extended_class.php");
|
||||
$ue = new e107_user_extended;
|
||||
|
||||
if (isset($_POST['newver'])) {
|
||||
if (isset($_POST['newver']))
|
||||
{
|
||||
header("location:http://e107.org/index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!getperms("1")) {
|
||||
if (!getperms("1"))
|
||||
{
|
||||
header("location:".e_BASE."index.php");
|
||||
exit;
|
||||
}
|
||||
$e_sub_cat = 'prefs';
|
||||
if (!$pref['timezone']) {
|
||||
if (!$pref['timezone'])
|
||||
{
|
||||
$pref['timezone'] = "GMT";
|
||||
}
|
||||
|
||||
@ -64,6 +67,7 @@ if (isset($_POST['updateprefs']))
|
||||
'antiflood_timeout' => array('min' => 3, 'max' => 300, 'default' => 10)
|
||||
);
|
||||
|
||||
$prefChanges = array();
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (isset($pref_limits[$key]))
|
||||
@ -77,17 +81,32 @@ if (isset($_POST['updateprefs']))
|
||||
{
|
||||
$value = $pref_limits[$key]['default'];
|
||||
}
|
||||
$pref[$key] = $value;
|
||||
$newValue = $value;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pref[$key] = $tp->toDB($value);
|
||||
$newValue = $tp->toDB($value);
|
||||
}
|
||||
if ($newValue != $pref[$key])
|
||||
{ // Changed value
|
||||
$pref[$key] = $newValue;
|
||||
$prefChanges[$key] = $newValue;
|
||||
}
|
||||
}
|
||||
|
||||
$e107cache->clear('',TRUE);
|
||||
$saved = save_prefs();
|
||||
$sql -> db_Select_gen("TRUNCATE ".MPREFIX."online");
|
||||
if (count($prefChanges))
|
||||
{ // Values have changed
|
||||
$e107cache->clear('',TRUE);
|
||||
$saved = save_prefs();
|
||||
$logStr = '';
|
||||
foreach ($prefChanges as $k => $v)
|
||||
{
|
||||
$logStr .= "[!br!]{$k} => {$v}";
|
||||
}
|
||||
$admin_log->log_event('PREFS_01',PRFLAN_195.$logStr,'');
|
||||
|
||||
$sql -> db_Select_gen("TRUNCATE ".MPREFIX."online");
|
||||
}
|
||||
if($saved)
|
||||
{
|
||||
header("location:".e_ADMIN."prefs.php?u");
|
||||
@ -108,14 +127,18 @@ if($sql->db_Select("plugin", "plugin_path", "plugin_installflag='1' AND plugin_p
|
||||
}
|
||||
}
|
||||
|
||||
if ($authlist) {
|
||||
if ($authlist)
|
||||
{
|
||||
$auth_dropdown .= "<select class='tbox' name='auth_method'>\n";
|
||||
foreach($authlist as $a) {
|
||||
foreach($authlist as $a)
|
||||
{
|
||||
$s = ($pref['auth_method'] == $a ? " selected='selected' " : "");
|
||||
$auth_dropdown .= "<option {$s}>".$a."</option>\n";
|
||||
}
|
||||
$auth_dropdown .= "</select>\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$auth_dropdown = "<input type='hidden' name='auth_method' value='' />".PRFLAN_151;
|
||||
$pref['auth_method'] = "";
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
// e107 Language File.
|
||||
// $Id: lan_log_messages.php,v 1.9 2008-05-17 15:00:41 e107steved Exp $
|
||||
// $Id: lan_log_messages.php,v 1.10 2008-08-17 15:18:14 e107steved Exp $
|
||||
|
||||
/*
|
||||
The definitions in this file are for standard 'explanatory' messages which might be entered
|
||||
@ -100,5 +100,9 @@ define('LAN_ROLL_LOG_09','Banned user attempted login');
|
||||
define('LAN_ROLL_LOG_10','Login fail - reason unknown');
|
||||
define('LAN_ROLL_LOG_11','Admin login fail');
|
||||
|
||||
// Prefs events
|
||||
//-------------
|
||||
define('LAN_AL_PREFS_01', 'Preferences changed');
|
||||
|
||||
|
||||
?>
|
||||
|
@ -12,8 +12,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_prefs.php,v $
|
||||
| $Revision: 1.12 $
|
||||
| $Date: 2008-06-13 20:20:21 $
|
||||
| $Revision: 1.13 $
|
||||
| $Date: 2008-08-17 15:18:14 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -203,7 +203,9 @@ define('PRFLAN_191', '(md5 is usually adequate for an Intranet, and often for ot
|
||||
define('PRFLAN_192', 'Generate random predefined login names according to a pattern');
|
||||
define('PRFLAN_193', 'To allow users to set their own login names, leave blank');
|
||||
define('PRFLAN_194', '# - alpha<br />. - numeric<br />* - alphanumeric<br />Other chars used as entered');
|
||||
define('PRFLAN_195', '');
|
||||
define('PRFLAN_195', 'Changed values:');
|
||||
define('PRFLAN_196', '');
|
||||
define('PRFLAN_197', '');
|
||||
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user