Vergleich admin/modules/tools/adminlog.php - 1.8.1 - 1.8.25

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 42Zeile 42
	if($mybb->request_method == 'post')
{
$is_today = false;

	if($mybb->request_method == 'post')
{
$is_today = false;

 
		$mybb->input['older_than'] = $mybb->get_input('older_than', MyBB::INPUT_INT);

		if($mybb->input['older_than'] <= 0)
{
$is_today = true;
$mybb->input['older_than'] = 1;
}

		if($mybb->input['older_than'] <= 0)
{
$is_today = true;
$mybb->input['older_than'] = 1;
}

		$where = 'dateline < '.(TIME_NOW-((int)$mybb->input['older_than']*86400));

		$where = 'dateline < '.(TIME_NOW-($mybb->input['older_than']*86400));


// Searching for entries by a particular user
if($mybb->input['uid'])
{


// Searching for entries by a particular user
if($mybb->input['uid'])
{

			$where .= " AND uid='".$mybb->get_input('uid', 1)."'";

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

		}

// Searching for entries in a specific module

		}

// Searching for entries in a specific module

Zeile 101Zeile 102
	");
while($user = $db->fetch_array($query))
{

	");
while($user = $db->fetch_array($query))
{

		$user_options[$user['uid']] = $user['username'];

		$user_options[$user['uid']] = htmlspecialchars_uni($user['username']);

	}

$module_options = array();

	}

$module_options = array();

Zeile 125Zeile 126
	{
$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: 30px'))." {$lang->days}", 'older_than');

	$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->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 139Zeile 140
	$page->output_header($lang->admin_logs);
$page->output_nav_tabs($sub_tabs, 'admin_logs');


	$page->output_header($lang->admin_logs);
$page->output_nav_tabs($sub_tabs, 'admin_logs');


	$perpage = $mybb->get_input('perpage', 1);

	$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT);

	if(!$perpage)
{
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)

	if(!$perpage)
{
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)

Zeile 157Zeile 158
	// Searching for entries by a particular user
if($mybb->input['uid'])
{

	// Searching for entries by a particular user
if($mybb->input['uid'])
{

		$where .= " AND l.uid='".$mybb->get_input('uid', 1)."'";

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

	}

// Searching for entries in a specific module

	}

// Searching for entries in a specific module

Zeile 192Zeile 193
	// Figure out if we need to display multiple pages.
if($mybb->input['page'] != "last")
{

	// Figure out if we need to display multiple pages.
if($mybb->input['page'] != "last")
{

		$pagecnt = $mybb->get_input('page', 1);

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

	}

$postcount = (int)$rescount;

	}

$postcount = (int)$rescount;

Zeile 237Zeile 238
	{
$information = '';
$trow = alt_trow();

	{
$information = '';
$trow = alt_trow();

 
		$logitem['username'] = htmlspecialchars_uni($logitem['username']);

		$username = format_name($logitem['username'], $logitem['usergroup'], $logitem['displaygroup']);

$logitem['data'] = my_unserialize($logitem['data']);

		$username = format_name($logitem['username'], $logitem['usergroup'], $logitem['displaygroup']);

$logitem['data'] = my_unserialize($logitem['data']);

Zeile 282Zeile 284
	");
while($user = $db->fetch_array($query))
{

	");
while($user = $db->fetch_array($query))
{

		$user_options[$user['uid']] = $user['username'];

		$user_options[$user['uid']] = htmlspecialchars_uni($user['username']);

	}

$module_options = array();

	}

$module_options = array();

Zeile 313Zeile 315
	$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->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->results_per_page, "", $form->generate_numeric_field('perpage', $perpage, array('id' => 'perpage')), 'perpage');

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


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


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

Zeile 325Zeile 327

/**
* Returns language-friendly string describing $logitem


/**
* Returns language-friendly string describing $logitem

 * @param array The log item (one row from mybb_adminlogs)

 * @param array $logitem The log item (one row from mybb_adminlogs)

 * @return string The description
*/
function get_admin_log_action($logitem)

 * @return string The description
*/
function get_admin_log_action($logitem)

Zeile 418Zeile 420
			$lang_string .= $logitem['data'][0];
break;
// == HOME ==

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

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

		// == STYLE ==
case 'admin_log_style_templates_delete_template': // deleting templates
// global template set

		// == STYLE ==
case 'admin_log_style_templates_delete_template': // deleting templates
// global template set

Zeile 449Zeile 454
			}
break;
case 'admin_log_tools_modlog_prune': // Moderator Log Pruning

			}
break;
case 'admin_log_tools_modlog_prune': // Moderator Log Pruning

			if($logitem['data'][1] && !$logitem['data'][2])
{

			if($logitem['data'][1] && !$logitem['data'][2])
{

				$lang_string = 'admin_log_tools_modlog_prune_user';

				$lang_string = 'admin_log_tools_modlog_prune_user';

			}

			}

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

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

			{

			{

				$lang_string = 'admin_log_tools_modlog_prune_forum';

				$lang_string = 'admin_log_tools_modlog_prune_forum';

			}

			}

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

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

			{

			{

				$lang_string = 'admin_log_tools_modlog_prune_user_forum';
}
break;

				$lang_string = 'admin_log_tools_modlog_prune_user_forum';
}
break;

Zeile 466Zeile 471
			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);
break;
case 'admin_log_tools_backupdb_dlbackup': // Download backup

			$logitem['data'][1] = '...'.substr($logitem['data'][1], -20);
break;
case 'admin_log_tools_backupdb_dlbackup': // Download backup

Zeile 483Zeile 488
			if(isset($lang->$detail_lang_string))
{
$lang_string = $detail_lang_string;

			if(isset($lang->$detail_lang_string))
{
$lang_string = $detail_lang_string;

 
			}
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 ==

			}
break;
// == USERS ==

Zeile 498Zeile 517
				$logitem['data'][0] = abs($logitem['data'][0]);
$lang_string .= '_group';
}

				$logitem['data'][0] = abs($logitem['data'][0]);
$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)









			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';
}
break;
case 'admin_log_user_awaiting_activation_activate':
if($logitem['data'][0] == 'deleted')

			{

			{

				// Group
$logitem['data'][0] = abs($logitem['data'][0]);
$lang_string .= '_group';



				$lang_string .= '_deleted';
}
else
{
$lang_string .= '_activated';

			}
break;
case 'admin_log_user_banning_': // banning

			}
break;
case 'admin_log_user_banning_': // banning

Zeile 531Zeile 560
			else
{
$lang_string = 'admin_log_user_groups_join_requests_deny';

			else
{
$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)

			{

			{

				$lang_string = 'admin_log_user_users_inline_banned_perm';

				$lang_string = 'admin_log_user_users_inline_banned_perm';

			}

			}

			else
{
$logitem['data'][1] = my_date($mybb->settings['dateformat'], $logitem['data'][1]);

			else
{
$logitem['data'][1] = my_date($mybb->settings['dateformat'], $logitem['data'][1]);

Zeile 545Zeile 574
			}
break;
}

			}
break;
}





	$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))
{