mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Always log admin userclass edits
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
* Administration Area - User classes
|
* Administration Area - User classes
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_admin/userclass2.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_admin/userclass2.php,v $
|
||||||
* $Revision: 1.37 $
|
* $Revision: 1.38 $
|
||||||
* $Date: 2010-01-16 19:53:34 $
|
* $Date: 2010-02-07 19:42:02 $
|
||||||
* $Author: e107steved $
|
* $Author: e107steved $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @package e107
|
* @package e107
|
||||||
* @subpackage admin
|
* @subpackage admin
|
||||||
* @version $Id: userclass2.php,v 1.37 2010-01-16 19:53:34 e107steved Exp $;
|
* @version $Id: userclass2.php,v 1.38 2010-02-07 19:42:02 e107steved Exp $;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('../class2.php');
|
require_once('../class2.php');
|
||||||
@@ -512,7 +512,7 @@ else
|
|||||||
|
|
||||||
$text .= "</div>";
|
$text .= "</div>";
|
||||||
$text .= "</form></div><br /><br />";
|
$text .= "</form></div><br /><br />";
|
||||||
$text .= $e_userclass->show_graphical_tree();
|
$text .= $e_userclass->show_graphical_tree();
|
||||||
|
|
||||||
|
|
||||||
$ns->tablerender(UCSLAN_21, $text);
|
$ns->tablerender(UCSLAN_21, $text);
|
||||||
@@ -605,13 +605,6 @@ $ns->tablerender(UCSLAN_21, $text);
|
|||||||
case 'options' :
|
case 'options' :
|
||||||
if (!check_class(e_UC_MAINADMIN)) break;
|
if (!check_class(e_UC_MAINADMIN)) break;
|
||||||
|
|
||||||
// Set general options
|
|
||||||
if (isset($_POST['set_admin_options']))
|
|
||||||
{
|
|
||||||
$pref['admin_log_log']['admin_userclass'] = intval($_POST['admin_log_userclass']);
|
|
||||||
save_prefs();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST['add_class_tree']))
|
if (isset($_POST['add_class_tree']))
|
||||||
{ // Create a default tree
|
{ // Create a default tree
|
||||||
$message = UCSLAN_62;
|
$message = UCSLAN_62;
|
||||||
@@ -645,16 +638,6 @@ $ns->tablerender(UCSLAN_21, $text);
|
|||||||
$ns->tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
|
$ns->tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = "<form method='post' action='".e_SELF."?options' id='optionsForm'>
|
|
||||||
<table class='fborder' style='".ADMIN_WIDTH."'>
|
|
||||||
<tr><td>".UCSLAN_59."</td><td>
|
|
||||||
<input type='checkbox' name='admin_log_userclass' value='1'".(varset($pref['admin_log_log']['admin_userclass'],0) ? " checked='checked'" : '')."/></td></tr>
|
|
||||||
<tr><td style='text-align:center' colspan='2'>
|
|
||||||
<input class='button' type='submit' name='set_admin_options' value='".UCSLAN_UPDATE."' />
|
|
||||||
</td>
|
|
||||||
</tr></table></form>";
|
|
||||||
$ns->tablerender(UCSLAN_60, $text);
|
|
||||||
|
|
||||||
|
|
||||||
$text = "<form method='post' action='".e_SELF."?options' id='treesetForm'>
|
$text = "<form method='post' action='".e_SELF."?options' id='treesetForm'>
|
||||||
<table class='fborder' style='text-align:center; ".ADMIN_WIDTH."'>
|
<table class='fborder' style='text-align:center; ".ADMIN_WIDTH."'>
|
||||||
@@ -809,13 +792,18 @@ $ns->tablerender(UCSLAN_21, $text);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Log event to admin log
|
|
||||||
|
/**
|
||||||
|
* Log event to admin log
|
||||||
|
*
|
||||||
|
* @param string $msg_num - 2-digit event number (MUST be as a string)
|
||||||
|
* @param string $woffle - log detail
|
||||||
|
*
|
||||||
|
* @return none
|
||||||
|
*/
|
||||||
function userclass2_adminlog($msg_num='00', $woffle='')
|
function userclass2_adminlog($msg_num='00', $woffle='')
|
||||||
{
|
{
|
||||||
global $pref, $admin_log;
|
e107::getAdminLog()->log_event('UCLASS_'.$msg_num,$woffle,E_LOG_INFORMATIVE,'');
|
||||||
if (!varset($pref['admin_log_log']['admin_userclass'],0)) return;
|
|
||||||
// $admin_log->log_event($title,$woffle,E_LOG_INFORMATIVE,'UCLASS_'.$msg_num);
|
|
||||||
$admin_log->log_event('UCLASS_'.$msg_num,$woffle,E_LOG_INFORMATIVE,'');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -9,8 +9,8 @@
|
|||||||
* User class functions
|
* User class functions
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/userclass_class.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_handlers/userclass_class.php,v $
|
||||||
* $Revision: 1.48 $
|
* $Revision: 1.49 $
|
||||||
* $Date: 2010-01-11 21:09:31 $
|
* $Date: 2010-02-07 19:42:07 $
|
||||||
* $Author: e107steved $
|
* $Author: e107steved $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
*
|
*
|
||||||
* @package e107
|
* @package e107
|
||||||
* @subpackage e107_handlers
|
* @subpackage e107_handlers
|
||||||
* @version $Id: userclass_class.php,v 1.48 2010-01-11 21:09:31 e107steved Exp $;
|
* @version $Id: userclass_class.php,v 1.49 2010-02-07 19:42:07 e107steved Exp $;
|
||||||
*
|
*
|
||||||
* This class handles all user-related user class functions. Admin functions inherit from it.
|
* This class handles all user-related user class functions. Admin functions inherit from it.
|
||||||
*/
|
*/
|
||||||
@@ -1186,8 +1186,8 @@ class user_class_admin extends user_class
|
|||||||
}
|
}
|
||||||
if ($this->graph_debug) $name_line .= "[vis:".$this->class_tree[$listnum]['userclass_visibility'].", edit:".$this->class_tree[$listnum]['userclass_editclass']."] = ".$this->class_tree[$listnum]['userclass_accum']." Children: ".implode(',',$this->class_tree[$listnum]['class_children']);
|
if ($this->graph_debug) $name_line .= "[vis:".$this->class_tree[$listnum]['userclass_visibility'].", edit:".$this->class_tree[$listnum]['userclass_editclass']."] = ".$this->class_tree[$listnum]['userclass_accum']." Children: ".implode(',',$this->class_tree[$listnum]['class_children']);
|
||||||
// Next (commented out) line gives a 'conventional' link
|
// Next (commented out) line gives a 'conventional' link
|
||||||
$ret .= "<img src='".UC_ICON_DIR."topicon.png' alt='class icon' /><a style='text-decoration: none' class='userclass_edit' href='".e_ADMIN_ABS."userclass2.php?config.edit.{$this->class_tree[$listnum]['userclass_id']}'>".$name_line."</a></div>";
|
//$ret .= "<img src='".UC_ICON_DIR."topicon.png' alt='class icon' /><a style='text-decoration: none' class='userclass_edit' href='".e_ADMIN_ABS."userclass2.php?config.edit.{$this->class_tree[$listnum]['userclass_id']}'>".$name_line."</a></div>";
|
||||||
// $ret .= "<img src='".UC_ICON_DIR."topicon.png' alt='class icon' /><a style='text-decoration: none' class='userclass_edit' href='".e_ADMIN_ABS."userclass2.php?config.edit.{$this->class_tree[$listnum]['userclass_id']}'>".$this->class_tree[$listnum]['userclass_name']."</a></div>";
|
$ret .= "<img src='".UC_ICON_DIR."topicon.png' alt='class icon' /><a style='text-decoration: none' class='userclass_edit' href='".e_SELF."?action=edit&id={$this->class_tree[$listnum]['userclass_id']}'>".$name_line."</a></div>";
|
||||||
//$ret .= "<img src='".UC_ICON_DIR."topicon.png' alt='class icon' />
|
//$ret .= "<img src='".UC_ICON_DIR."topicon.png' alt='class icon' />
|
||||||
//<span style='cursor:pointer; vertical-align: bottom' onclick=\"javascript: document.location.href='".e_ADMIN."userclass2.php?config.edit.{$this->class_tree[$listnum]['userclass_id']}'\">".$name_line."</span></div>";
|
//<span style='cursor:pointer; vertical-align: bottom' onclick=\"javascript: document.location.href='".e_ADMIN."userclass2.php?config.edit.{$this->class_tree[$listnum]['userclass_id']}'\">".$name_line."</span></div>";
|
||||||
// vertical-align: middle doesn't work! Nor does text-top
|
// vertical-align: middle doesn't work! Nor does text-top
|
||||||
|
Reference in New Issue
Block a user