Vergleich admin/modules/tools/adminlog.php - 1.8.8 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 88Zeile 88
	$page->output_nav_tabs($sub_tabs, 'prune_admin_logs');

// Fetch filter options

	$page->output_nav_tabs($sub_tabs, 'prune_admin_logs');

// Fetch filter options

	$sortbysel[$mybb->input['sortby']] = 'selected="selected"';
$ordersel[$mybb->input['order']] = 'selected="selected"';

	$sortbysel[$mybb->get_input('sortby')] = 'selected="selected"';
$ordersel[$mybb->get_input('order')] = 'selected="selected"';


$user_options[''] = $lang->all_administrators;
$user_options['0'] = '----------';


$user_options[''] = $lang->all_administrators;
$user_options['0'] = '----------';

Zeile 120Zeile 120

$form = new Form("index.php?module=tools-adminlog&action=prune", "post");
$form_container = new FormContainer($lang->prune_administrator_logs);


$form = new Form("index.php?module=tools-adminlog&action=prune", "post");
$form_container = new FormContainer($lang->prune_administrator_logs);

	$form_container->output_row($lang->module, "", $form->generate_select_box('filter_module', $module_options, $mybb->input['filter_module'], array('id' => 'filter_module')), 'filter_module');
$form_container->output_row($lang->administrator, "", $form->generate_select_box('uid', $user_options, $mybb->input['uid'], array('id' => 'uid')), 'uid');
if(!$mybb->input['older_than'])

	$form_container->output_row($lang->module, "", $form->generate_select_box('filter_module', $module_options, $mybb->get_input('filter_module'), array('id' => 'filter_module')), 'filter_module');
$form_container->output_row($lang->administrator, "", $form->generate_select_box('uid', $user_options, $mybb->get_input('uid'), array('id' => 'uid')), 'uid');
if(!$mybb->get_input('older_than'))

	{
$mybb->input['older_than'] = '30';
}

	{
$mybb->input['older_than'] = '30';
}

	$form_container->output_row($lang->date_range, "", $lang->older_than.$form->generate_numeric_field('older_than', $mybb->input['older_than'], array('id' => 'older_than', 'style' => 'width: 50px', 'min' => 0))." {$lang->days}", 'older_than');

	$form_container->output_row($lang->date_range, "", $lang->older_than.$form->generate_numeric_field('older_than', $mybb->get_input('older_than'), array('id' => 'older_than', 'style' => 'width: 50px', 'min' => 0))." {$lang->days}", 'older_than');

	$form_container->end();
$buttons[] = $form->generate_submit_button($lang->prune_administrator_logs);
$form->output_submit_wrapper($buttons);

	$form_container->end();
$buttons[] = $form->generate_submit_button($lang->prune_administrator_logs);
$form->output_submit_wrapper($buttons);

Zeile 156Zeile 156
	$plugins->run_hooks("admin_tools_adminlog_start");

// Searching for entries by a particular user

	$plugins->run_hooks("admin_tools_adminlog_start");

// Searching for entries by a particular user

	if($mybb->input['uid'])

	if(!empty($mybb->input['uid']))

	{
$where .= " AND l.uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";
}

// Searching for entries in a specific module

	{
$where .= " AND l.uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";
}

// Searching for entries in a specific module

	if($mybb->input['filter_module'])

	if(!empty($mybb->input['filter_module']))

	{
$where .= " AND module='".$db->escape_string($mybb->input['filter_module'])."'";
}

// Order?

	{
$where .= " AND module='".$db->escape_string($mybb->input['filter_module'])."'";
}

// Order?

	switch($mybb->input['sortby'])

	switch($mybb->get_input('sortby'))

	{
case "username":
$sortby = "u.username";

	{
case "username":
$sortby = "u.username";

Zeile 176Zeile 176
		default:
$sortby = "l.dateline";
}

		default:
$sortby = "l.dateline";
}

	$order = $mybb->input['order'];

	$order = $mybb->get_input('order');

	if($order != 'asc')
{
$order = 'desc';

	if($order != 'asc')
{
$order = 'desc';

Zeile 191Zeile 191
	$rescount = $db->fetch_field($query, "count");

// Figure out if we need to display multiple pages.

	$rescount = $db->fetch_field($query, "count");

// Figure out if we need to display multiple pages.

	if($mybb->input['page'] != "last")

	if($mybb->get_input('page') != "last")

	{
$pagecnt = $mybb->get_input('page', MyBB::INPUT_INT);
}

	{
$pagecnt = $mybb->get_input('page', MyBB::INPUT_INT);
}

Zeile 200Zeile 200
	$pages = $postcount / $perpage;
$pages = ceil($pages);


	$pages = $postcount / $perpage;
$pages = ceil($pages);


	if($mybb->input['page'] == "last")

	if($mybb->get_input('page') == "last")

	{
$pagecnt = $pages;
}

	{
$pagecnt = $pages;
}

Zeile 266Zeile 266
	// Do we need to construct the pagination?
if($rescount > $perpage)
{

	// Do we need to construct the pagination?
if($rescount > $perpage)
{

		echo draw_admin_pagination($pagecnt, $perpage, $rescount, "index.php?module=tools-adminlog&amp;perpage=$perpage&amp;uid={$mybb->input['uid']}&amp;fid={$mybb->input['fid']}&amp;sortby={$mybb->input['sortby']}&amp;order={$order}&amp;filter_module=".htmlspecialchars_uni($mybb->input['filter_module']))."<br />";

		echo draw_admin_pagination($pagecnt, $perpage, $rescount, "index.php?module=tools-adminlog&amp;perpage=$perpage&amp;uid={$mybb->get_input('uid')}&amp;fid={$mybb->get_input('fid')}&amp;sortby={$mybb->get_input('sortby')}&amp;order={$order}&amp;filter_module=".htmlspecialchars_uni($mybb->get_input('filter_module')))."<br />";

	}

// Fetch filter options

	}

// Fetch filter options

	$sortbysel[$mybb->input['sortby']] = 'selected="selected"';
$ordersel[$mybb->input['order']] = 'selected="selected"';

	$sortbysel[$mybb->get_input('sortby')] = 'selected="selected"';
$ordersel[$mybb->get_input('order')] = 'selected="selected"';


$user_options[''] = $lang->all_administrators;
$user_options['0'] = '----------';


$user_options[''] = $lang->all_administrators;
$user_options['0'] = '----------';

Zeile 312Zeile 312

$form = new Form("index.php?module=tools-adminlog", "post");
$form_container = new FormContainer($lang->filter_administrator_logs);


$form = new Form("index.php?module=tools-adminlog", "post");
$form_container = new FormContainer($lang->filter_administrator_logs);

	$form_container->output_row($lang->module, "", $form->generate_select_box('filter_module', $module_options, $mybb->input['filter_module'], array('id' => 'filter_module')), 'filter_module');
$form_container->output_row($lang->administrator, "", $form->generate_select_box('uid', $user_options, $mybb->input['uid'], array('id' => 'uid')), 'uid');
$form_container->output_row($lang->sort_by, "", $form->generate_select_box('sortby', $sort_by, $mybb->input['sortby'], array('id' => 'sortby'))." {$lang->in} ".$form->generate_select_box('order', $order_array, $order, array('id' => 'order'))." {$lang->order}", 'order');

	$form_container->output_row($lang->module, "", $form->generate_select_box('filter_module', $module_options, $mybb->get_input('filter_module'), array('id' => 'filter_module')), 'filter_module');
$form_container->output_row($lang->administrator, "", $form->generate_select_box('uid', $user_options, $mybb->get_input('uid'), array('id' => 'uid')), 'uid');
$form_container->output_row($lang->sort_by, "", $form->generate_select_box('sortby', $sort_by, $mybb->get_input('sortby'), array('id' => 'sortby'))." {$lang->in} ".$form->generate_select_box('order', $order_array, $order, array('id' => 'order'))." {$lang->order}", 'order');

	$form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('perpage', $perpage, array('id' => 'perpage', 'min' => 1)), 'perpage');

$form_container->end();

	$form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('perpage', $perpage, array('id' => 'perpage', 'min' => 1)), 'perpage');

$form_container->end();

Zeile 335Zeile 335
	global $lang, $plugins, $mybb;

$logitem['module'] = str_replace('/', '-', $logitem['module']);

	global $lang, $plugins, $mybb;

$logitem['module'] = str_replace('/', '-', $logitem['module']);

	list($module, $action) = explode('-', $logitem['module']);













$module_path = explode('-', $logitem['module']);
$module = $module_path[0];
if(isset($module_path[1]))
{
$action = $module_path[1];
}
else
{
$action = null;
}


	$lang_string = 'admin_log_'.$module.'_'.$action.'_'.$logitem['action'];

// Specific page overrides

	$lang_string = 'admin_log_'.$module.'_'.$action.'_'.$logitem['action'];

// Specific page overrides

Zeile 362Zeile 373
		case 'admin_log_config_help_documents_edit':
case 'admin_log_config_help_documents_delete':
$lang_string .= "_{$logitem['data'][2]}"; // adds _section or _document

		case 'admin_log_config_help_documents_edit':
case 'admin_log_config_help_documents_delete':
$lang_string .= "_{$logitem['data'][2]}"; // adds _section or _document

			break;

			break;


case 'admin_log_config_languages_edit': // Editing language variables
$logitem['data'][1] = basename($logitem['data'][1]);


case 'admin_log_config_languages_edit': // Editing language variables
$logitem['data'][1] = basename($logitem['data'][1]);

Zeile 402Zeile 413
			}
break;
case 'admin_log_forum_management_copy': // Forum copy

			}
break;
case 'admin_log_forum_management_copy': // Forum copy

			if($logitem['data'][4])

			if(!empty($logitem['data'][4]))

			{
$lang_string .= '_with_permissions';
}

			{
$lang_string .= '_with_permissions';
}

Zeile 410Zeile 421
		case 'admin_log_forum_management_': // add mod, permissions, forum orders
// first parameter already set with action
$lang_string .= $logitem['data'][0];

		case 'admin_log_forum_management_': // add mod, permissions, forum orders
// first parameter already set with action
$lang_string .= $logitem['data'][0];

			if($logitem['data'][0] == 'orders' && $logitem['data'][1])

			if($logitem['data'][0] == 'orders' && !empty($logitem['data'][1]))

			{
$lang_string .= '_sub'; // updating forum orders in a subforum
}
break;
case 'admin_log_forum_moderation_queue_': //moderation queue
// first parameter already set with action

			{
$lang_string .= '_sub'; // updating forum orders in a subforum
}
break;
case 'admin_log_forum_moderation_queue_': //moderation queue
// first parameter already set with action

			$lang_string .= $logitem['data'][0];
break;

			$lang_string .= $logitem['data'][0];
break;

		// == HOME ==
case 'admin_log_home_preferences_': // 2FA
$lang_string .= $logitem['data'][0]; // either "enabled" or "disabled"

		// == HOME ==
case 'admin_log_home_preferences_': // 2FA
$lang_string .= $logitem['data'][0]; // either "enabled" or "disabled"

			break;

			break;

		// == STYLE ==
case 'admin_log_style_templates_delete_template': // deleting templates

		// == STYLE ==
case 'admin_log_style_templates_delete_template': // deleting templates

			// global template set
if($logitem['data'][2] == -1)
{
$lang_string .= '_global';

			// global template set
if($logitem['data'][2] == -1)
{
$lang_string .= '_global';

			}
break;
case 'admin_log_style_templates_edit_template': // editing templates

			}
break;
case 'admin_log_style_templates_edit_template': // editing templates

Zeile 443Zeile 454
			if($logitem['data'][1] && !$logitem['data'][2])
{
$lang_string = 'admin_log_tools_adminlog_prune_user';

			if($logitem['data'][1] && !$logitem['data'][2])
{
$lang_string = 'admin_log_tools_adminlog_prune_user';

			}
elseif($logitem['data'][2] && !$logitem['data'][1])

			}
elseif($logitem['data'][2] && !$logitem['data'][1])

			{
$lang_string = 'admin_log_tools_adminlog_prune_module';

			{
$lang_string = 'admin_log_tools_adminlog_prune_module';

			}
elseif($logitem['data'][1] && $logitem['data'][2])

			}
elseif($logitem['data'][1] && $logitem['data'][2])

			{
$lang_string = 'admin_log_tools_adminlog_prune_user_module';

			{
$lang_string = 'admin_log_tools_adminlog_prune_user_module';

			}

			}

			break;
case 'admin_log_tools_modlog_prune': // Moderator Log Pruning
if($logitem['data'][1] && !$logitem['data'][2])

			break;
case 'admin_log_tools_modlog_prune': // Moderator Log Pruning
if($logitem['data'][1] && !$logitem['data'][2])

			{

			{

				$lang_string = 'admin_log_tools_modlog_prune_user';
}
elseif($logitem['data'][2] && !$logitem['data'][1])
{
$lang_string = 'admin_log_tools_modlog_prune_forum';

				$lang_string = 'admin_log_tools_modlog_prune_user';
}
elseif($logitem['data'][2] && !$logitem['data'][1])
{
$lang_string = 'admin_log_tools_modlog_prune_forum';

			}

			}

			elseif($logitem['data'][1] && $logitem['data'][2])
{
$lang_string = 'admin_log_tools_modlog_prune_user_forum';

			elseif($logitem['data'][1] && $logitem['data'][2])
{
$lang_string = 'admin_log_tools_modlog_prune_user_forum';

Zeile 471Zeile 482
			if($logitem['data'][0] == 'download')
{
$lang_string = 'admin_log_tools_backupdb_backup_download';

			if($logitem['data'][0] == 'download')
{
$lang_string = 'admin_log_tools_backupdb_backup_download';

			}
$logitem['data'][1] = '...'.substr($logitem['data'][1], -20);





			}

if(isset($logitem['data'][1]))
{
$logitem['data'][1] = '...'.substr($logitem['data'][1], -20);
}

			break;
case 'admin_log_tools_backupdb_dlbackup': // Download backup

			break;
case 'admin_log_tools_backupdb_dlbackup': // Download backup

			$logitem['data'][0] = '...'.substr($logitem['data'][0], -20);

			$logitem['data'][0] = '...'.substr($logitem['data'][0], -20);

			break;
case 'admin_log_tools_backupdb_delete': // Delete backup
$logitem['data'][0] = '...'.substr($logitem['data'][0], -20);
break;
case 'admin_log_tools_optimizedb_': // Optimize DB
$logitem['data'][0] = @implode(', ', my_unserialize($logitem['data'][0]));

			break;
case 'admin_log_tools_backupdb_delete': // Delete backup
$logitem['data'][0] = '...'.substr($logitem['data'][0], -20);
break;
case 'admin_log_tools_optimizedb_': // Optimize DB
$logitem['data'][0] = @implode(', ', my_unserialize($logitem['data'][0]));

			break;

			break;

		case 'admin_log_tools_recount_rebuild_': // Recount and rebuild
$detail_lang_string = $lang_string.$logitem['data'][0];
if(isset($lang->$detail_lang_string))
{
$lang_string = $detail_lang_string;

		case 'admin_log_tools_recount_rebuild_': // Recount and rebuild
$detail_lang_string = $lang_string.$logitem['data'][0];
if(isset($lang->$detail_lang_string))
{
$lang_string = $detail_lang_string;

			}
break;















			}
break;
case 'admin_log_tools_spamlog_prune': // Spam Log Pruning
if($logitem['data'][1] && !$logitem['data'][2])
{
$lang_string = 'admin_log_tools_spamlog_prune_user';
}
elseif($logitem['data'][2] && !$logitem['data'][1])
{
$lang_string = 'admin_log_tools_spamlog_prune_email';
}
elseif($logitem['data'][1] && $logitem['data'][2])
{
$lang_string = 'admin_log_tools_spamlog_prune_user_email';
}
break;

		// == USERS ==
case 'admin_log_user_admin_permissions_edit': // editing default/group/user admin permissions
if($logitem['data'][0] > 0)

		// == USERS ==
case 'admin_log_user_admin_permissions_edit': // editing default/group/user admin permissions
if($logitem['data'][0] > 0)

Zeile 504Zeile 533
				$lang_string .= '_group';
}
break;

				$lang_string .= '_group';
}
break;

		case 'admin_log_user_admin_permissions_delete': // deleting group/user admin permissions
if($logitem['data'][0] > 0)
{
// User
$lang_string .= '_user';
}
elseif($logitem['data'][0] < 0)
{
// Group
$logitem['data'][0] = abs($logitem['data'][0]);
$lang_string .= '_group';











		case 'admin_log_user_admin_permissions_delete': // deleting group/user admin permissions
if($logitem['data'][0] > 0)
{
// User
$lang_string .= '_user';
}
elseif($logitem['data'][0] < 0)
{
// Group
$logitem['data'][0] = abs($logitem['data'][0]);
$lang_string .= '_group';
}
break;
case 'admin_log_user_awaiting_activation_activate':
if($logitem['data'][0] == 'deleted')
{
$lang_string .= '_deleted';
}
else
{
$lang_string .= '_activated';

			}
break;
case 'admin_log_user_banning_': // banning

			}
break;
case 'admin_log_user_banning_': // banning

Zeile 526Zeile 565
			{
$logitem['data'][2] = my_date($mybb->settings['dateformat'], $logitem['data'][2]);
$lang_string = 'admin_log_user_banning_add_temporary';

			{
$logitem['data'][2] = my_date($mybb->settings['dateformat'], $logitem['data'][2]);
$lang_string = 'admin_log_user_banning_add_temporary';

			}

			}

			break;
case 'admin_log_user_groups_join_requests':
if($logitem['data'][0] == 'approve')

			break;
case 'admin_log_user_groups_join_requests':
if($logitem['data'][0] == 'approve')

			{

			{

				$lang_string = 'admin_log_user_groups_join_requests_approve';

				$lang_string = 'admin_log_user_groups_join_requests_approve';

			}
else

			}
else

			{
$lang_string = 'admin_log_user_groups_join_requests_deny';

			{
$lang_string = 'admin_log_user_groups_join_requests_deny';

			}

			}

			break;
case 'admin_log_user_users_inline_banned':
if($logitem['data'][1] == 0)

			break;
case 'admin_log_user_users_inline_banned':
if($logitem['data'][1] == 0)

Zeile 553Zeile 592

$plugin_array = array('logitem' => &$logitem, 'lang_string' => &$lang_string);
$plugins->run_hooks("admin_tools_get_admin_log_action", $plugin_array);


$plugin_array = array('logitem' => &$logitem, 'lang_string' => &$lang_string);
$plugins->run_hooks("admin_tools_get_admin_log_action", $plugin_array);

 

foreach($logitem['data'] as $key => $value)
{
$logitem['data'][$key] = htmlspecialchars_uni($value);
}


if(isset($lang->$lang_string))
{


if(isset($lang->$lang_string))
{