blob: f2033830e6a8b787893e40671afad96f1c53aa5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<?php
require_once( '../../kernel/setup_inc.php' );
include_once( KERNEL_PKG_PATH.'simple_form_functions_lib.php' );
$gBitSystem->verifyPermission( 'p_admin' );
$gContent = new LibertyContent();
// logging options
$logSettings = array(
'liberty_action_log' => array(
'label' => 'Action Logs',
'note' => 'Log all changes made to liberty content.',
'type' => 'toggle',
),
);
$gBitSmarty->assign( 'logSettings', $logSettings );
// form processing
if( !empty( $_REQUEST['apply_settings'] ) ) {
$settings = array_merge( $logSettings );
foreach( array_keys( $settings ) as $item ) {
simple_set_toggle( $item, LIBERTY_PKG_NAME );
}
if( !empty( $_REQUEST['log_prune'] ) ) {
$gContent->expungeActionLog( $_REQUEST['log_prune'] );
}
}
// get list of log entries
$listHash = $_REQUEST;
// since this is all just text and we don't want to search through hundreds of pages
$listHash['max_records'] = $gBitSystem->getConfig( 'max_records', 10 ) * 5;
$actionLogs = $gContent->getActionLogs( $listHash );
$gBitSmarty->assign( 'listInfo', $listHash['listInfo'] );
$gBitSmarty->assign( 'actionLogs', $actionLogs );
$gBitSystem->display( 'bitpackage:liberty/action_logs.tpl', tra( 'Action Logs' ) , array( 'display_mode' => 'admin' ));
?>
|