Vergleich admin/modules/tools/cache.php - 1.8.14 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 54Zeile 54
		admin_redirect("index.php?module=tools-cache");
}


		admin_redirect("index.php?module=tools-cache");
}


	$cachecontents = unserialize($cacheitem['cache']);



	// use native_unserialize() over my_unserialize() for performance reasons
$cachecontents = native_unserialize($cacheitem['cache']);


	if(empty($cachecontents))
{
$cachecontents = $lang->error_empty_cache;

	if(empty($cachecontents))
{
$cachecontents = $lang->error_empty_cache;

Zeile 63Zeile 65
	print_r($cachecontents);
$cachecontents = htmlspecialchars_uni(ob_get_contents());
ob_end_clean();

	print_r($cachecontents);
$cachecontents = htmlspecialchars_uni(ob_get_contents());
ob_end_clean();





	$page->add_breadcrumb_item($lang->view);
$page->output_header($lang->cache_manager);

	$page->add_breadcrumb_item($lang->view);
$page->output_header($lang->cache_manager);





	$table = new Table;

	$table = new Table;





	$table->construct_cell("<pre>\n{$cachecontents}\n</pre>");
$table->construct_row();
$table->output($lang->cache." {$cacheitem['title']}");

$page->output_footer();

	$table->construct_cell("<pre>\n{$cachecontents}\n</pre>");
$table->construct_row();
$table->output($lang->cache." {$cacheitem['title']}");

$page->output_footer();


}



}


if($mybb->input['action'] == "rebuild" || $mybb->input['action'] == "reload")
{

if($mybb->input['action'] == "rebuild" || $mybb->input['action'] == "reload")
{

	if(!verify_post_check($mybb->input['my_post_key']))
{

	if(!verify_post_check($mybb->get_input('my_post_key')))
{

		flash_message($lang->invalid_post_verify_key2, 'error');

		flash_message($lang->invalid_post_verify_key2, 'error');

		admin_redirect("index.php?module=tools-cache");

		admin_redirect("index.php?module=tools-cache");

	}

	}





	$plugins->run_hooks("admin_tools_cache_rebuild");

	$plugins->run_hooks("admin_tools_cache_rebuild");





	// Rebuilds forum settings
if($mybb->input['title'] == 'settings')
{
rebuild_settings();

	// Rebuilds forum settings
if($mybb->input['title'] == 'settings')
{
rebuild_settings();


$plugins->run_hooks("admin_tools_cache_rebuild_commit");

// Log admin action
log_admin_action($mybb->input['title']);

flash_message($lang->success_cache_reloaded, 'success');
admin_redirect("index.php?module=tools-cache");


$plugins->run_hooks("admin_tools_cache_rebuild_commit");

// Log admin action
log_admin_action($mybb->input['title']);

flash_message($lang->success_cache_reloaded, 'success');
admin_redirect("index.php?module=tools-cache");

	}

if(method_exists($cache, "update_{$mybb->input['title']}"))
{
$func = "update_{$mybb->input['title']}";

	}

if(method_exists($cache, "update_{$mybb->input['title']}"))
{
$func = "update_{$mybb->input['title']}";

		$cache->$func();

		$cache->$func();


$plugins->run_hooks("admin_tools_cache_rebuild_commit");



$plugins->run_hooks("admin_tools_cache_rebuild_commit");


Zeile 119Zeile 121
		$func = "reload_{$mybb->input['title']}";
$cache->$func();


		$func = "reload_{$mybb->input['title']}";
$cache->$func();


		$plugins->run_hooks("admin_tools_cache_rebuild_commit");


		$plugins->run_hooks("admin_tools_cache_rebuild_commit");


		// Log admin action
log_admin_action($mybb->input['title']);


		// Log admin action
log_admin_action($mybb->input['title']);


Zeile 161Zeile 163
}

if($mybb->input['action'] == "rebuild_all")

}

if($mybb->input['action'] == "rebuild_all")

{
if(!verify_post_check($mybb->input['my_post_key']))
{

{
if(!verify_post_check($mybb->get_input('my_post_key')))
{

		flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=tools-cache");
}

		flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=tools-cache");
}

Zeile 174Zeile 176
	while($cacheitem = $db->fetch_array($query))
{
if(method_exists($cache, "update_{$cacheitem['title']}"))

	while($cacheitem = $db->fetch_array($query))
{
if(method_exists($cache, "update_{$cacheitem['title']}"))

		{

		{

			$func = "update_{$cacheitem['title']}";

			$func = "update_{$cacheitem['title']}";

			$cache->$func();
}

			$cache->$func();
}

		elseif(method_exists($cache, "reload_{$cacheitem['title']}"))
{
$func = "reload_{$cacheitem['title']}";
$cache->$func();
}
elseif(function_exists("update_{$cacheitem['title']}"))

		elseif(method_exists($cache, "reload_{$cacheitem['title']}"))
{
$func = "reload_{$cacheitem['title']}";
$cache->$func();
}
elseif(function_exists("update_{$cacheitem['title']}"))

		{

		{

			$func = "update_{$cacheitem['title']}";
$func();
}

			$func = "update_{$cacheitem['title']}";
$func();
}

Zeile 226Zeile 228
	$table->construct_header($lang->size, array("class" => "align_center", "width" => 100));
$table->construct_header($lang->controls, array("class" => "align_center", "width" => 150));


	$table->construct_header($lang->size, array("class" => "align_center", "width" => 100));
$table->construct_header($lang->controls, array("class" => "align_center", "width" => 150));


	$query = $db->simple_select("datacache");

	$query = $db->simple_select("datacache", "*", "", array("order_by" => "title"));

	while($cacheitem = $db->fetch_array($query))
{
$table->construct_cell("<strong><a href=\"index.php?module=tools-cache&amp;action=view&amp;title=".urlencode($cacheitem['title'])."\">{$cacheitem['title']}</a></strong>");

	while($cacheitem = $db->fetch_array($query))
{
$table->construct_cell("<strong><a href=\"index.php?module=tools-cache&amp;action=view&amp;title=".urlencode($cacheitem['title'])."\">{$cacheitem['title']}</a></strong>");