Vergleich admin/modules/tools/recount_rebuild.php - 1.6.1 - 1.6.18

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: recount_rebuild.php 5112 2010-07-25 22:30:31Z RyanGordon $

 * $Id$

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 28Zeile 28
	
$page = intval($mybb->input['page']);
$per_page = intval($mybb->input['forumcounters']);

	
$page = intval($mybb->input['page']);
$per_page = intval($mybb->input['forumcounters']);

 
	if($per_page <= 0)
{
$per_page = 50;
}

	$start = ($page-1) * $per_page;
$end = $start + $per_page;

	$start = ($page-1) * $per_page;
$end = $start + $per_page;





	$query = $db->simple_select("forums", "fid", '', array('order_by' => 'fid', 'order_dir' => 'asc', 'limit_start' => $start, 'limit' => $per_page));
while($forum = $db->fetch_array($query))

	$query = $db->simple_select("forums", "fid", '', array('order_by' => 'fid', 'order_dir' => 'asc', 'limit_start' => $start, 'limit' => $per_page));
while($forum = $db->fetch_array($query))

	{

	{

		$update['parentlist'] = make_parent_list($forum['fid']);
$db->update_query("forums", $update, "fid='{$forum['fid']}'");
rebuild_forum_counters($forum['fid']);

		$update['parentlist'] = make_parent_list($forum['fid']);
$db->update_query("forums", $update, "fid='{$forum['fid']}'");
rebuild_forum_counters($forum['fid']);

Zeile 45Zeile 49
function acp_rebuild_thread_counters()
{
global $db, $mybb, $lang;

function acp_rebuild_thread_counters()
{
global $db, $mybb, $lang;

	

	

	$query = $db->simple_select("threads", "COUNT(*) as num_threads");
$num_threads = $db->fetch_field($query, 'num_threads');

$page = intval($mybb->input['page']);
$per_page = intval($mybb->input['threadcounters']);

	$query = $db->simple_select("threads", "COUNT(*) as num_threads");
$num_threads = $db->fetch_field($query, 'num_threads');

$page = intval($mybb->input['page']);
$per_page = intval($mybb->input['threadcounters']);

 
	if($per_page <= 0)
{
$per_page = 500;
}

	$start = ($page-1) * $per_page;
$end = $start + $per_page;


	$start = ($page-1) * $per_page;
$end = $start + $per_page;


Zeile 72Zeile 80
	
$page = intval($mybb->input['page']);
$per_page = intval($mybb->input['userposts']);

	
$page = intval($mybb->input['page']);
$per_page = intval($mybb->input['userposts']);

 
	if($per_page <= 0)
{
$per_page = 500;
}

	$start = ($page-1) * $per_page;
$end = $start + $per_page;


	$start = ($page-1) * $per_page;
$end = $start + $per_page;


Zeile 119Zeile 131
	
$page = intval($mybb->input['page']);
$per_page = intval($mybb->input['attachmentthumbs']);

	
$page = intval($mybb->input['page']);
$per_page = intval($mybb->input['attachmentthumbs']);

 
	if($per_page <= 0)
{
$per_page = 20;
}

	$start = ($page-1) * $per_page;
$end = $start + $per_page;


	$start = ($page-1) * $per_page;
$end = $start + $per_page;


Zeile 133Zeile 149
			$thumbname = str_replace(".attach", "_thumb.$ext", $attachment['attachname']);
$thumbnail = generate_thumbnail(MYBB_ROOT."uploads/".$attachment['attachname'], MYBB_ROOT."uploads/", $thumbname, $mybb->settings['attachthumbh'], $mybb->settings['attachthumbw']);
if($thumbnail['code'] == 4)

			$thumbname = str_replace(".attach", "_thumb.$ext", $attachment['attachname']);
$thumbnail = generate_thumbnail(MYBB_ROOT."uploads/".$attachment['attachname'], MYBB_ROOT."uploads/", $thumbname, $mybb->settings['attachthumbh'], $mybb->settings['attachthumbw']);
if($thumbnail['code'] == 4)

			{

			{

				$thumbnail['filename'] = "SMALL";
}
$db->update_query("attachments", array("thumbnail" => $thumbnail['filename']), "aid='{$attachment['aid']}'");

				$thumbnail['filename'] = "SMALL";
}
$db->update_query("attachments", array("thumbnail" => $thumbnail['filename']), "aid='{$attachment['aid']}'");

Zeile 202Zeile 218
			if(!intval($mybb->input['forumcounters']))
{
$mybb->input['forumcounters'] = 50;

			if(!intval($mybb->input['forumcounters']))
{
$mybb->input['forumcounters'] = 50;

			}


			}


			acp_rebuild_forum_counters();
}
elseif(isset($mybb->input['do_rebuildthreadcounters']))

			acp_rebuild_forum_counters();
}
elseif(isset($mybb->input['do_rebuildthreadcounters']))

Zeile 285Zeile 301
	$form_container->output_row_header($lang->name);
$form_container->output_row_header($lang->data_per_page, array('width' => 50));
$form_container->output_row_header("&nbsp;");

	$form_container->output_row_header($lang->name);
$form_container->output_row_header($lang->data_per_page, array('width' => 50));
$form_container->output_row_header("&nbsp;");

	
$form_container->output_cell("<label>{$lang->rebuild_thread_counters}</label><div class=\"description\">{$lang->rebuild_thread_counters_desc}</div>");
$form_container->output_cell($form->generate_text_box("threadcounters", 500, array('style' => 'width: 150px;')));
$form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_rebuildthreadcounters")));
$form_container->construct_row();

 
	
$form_container->output_cell("<label>{$lang->rebuild_forum_counters}</label><div class=\"description\">{$lang->rebuild_forum_counters_desc}</div>");
$form_container->output_cell($form->generate_text_box("forumcounters", 50, array('style' => 'width: 150px;')));

	
$form_container->output_cell("<label>{$lang->rebuild_forum_counters}</label><div class=\"description\">{$lang->rebuild_forum_counters_desc}</div>");
$form_container->output_cell($form->generate_text_box("forumcounters", 50, array('style' => 'width: 150px;')));

	$form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_rebuildforumcounters")));
$form_container->construct_row();

$form_container->output_cell("<label>{$lang->recount_stats}</label><div class=\"description\">{$lang->recount_stats_desc}</div>");
$form_container->output_cell($lang->na);
$form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_recountstats")));
$form_container->construct_row();


	$form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_rebuildforumcounters")));
$form_container->construct_row();

$form_container->output_cell("<label>{$lang->rebuild_thread_counters}</label><div class=\"description\">{$lang->rebuild_thread_counters_desc}</div>");
$form_container->output_cell($form->generate_text_box("threadcounters", 500, array('style' => 'width: 150px;')));
$form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_rebuildthreadcounters")));
$form_container->construct_row();


	$form_container->output_cell("<label>{$lang->recount_user_posts}</label><div class=\"description\">{$lang->recount_user_posts_desc}</div>");
$form_container->output_cell($form->generate_text_box("userposts", 500, array('style' => 'width: 150px;')));
$form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_recountuserposts")));

	$form_container->output_cell("<label>{$lang->recount_user_posts}</label><div class=\"description\">{$lang->recount_user_posts_desc}</div>");
$form_container->output_cell($form->generate_text_box("userposts", 500, array('style' => 'width: 150px;')));
$form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_recountuserposts")));

Zeile 309Zeile 320
	$form_container->output_cell("<label>{$lang->rebuild_attachment_thumbs}</label><div class=\"description\">{$lang->rebuild_attachment_thumbs_desc}</div>");
$form_container->output_cell($form->generate_text_box("attachmentthumbs", 20, array('style' => 'width: 150px;')));
$form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_rebuildattachmentthumbs")));

	$form_container->output_cell("<label>{$lang->rebuild_attachment_thumbs}</label><div class=\"description\">{$lang->rebuild_attachment_thumbs_desc}</div>");
$form_container->output_cell($form->generate_text_box("attachmentthumbs", 20, array('style' => 'width: 150px;')));
$form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_rebuildattachmentthumbs")));

 
	$form_container->construct_row();

$form_container->output_cell("<label>{$lang->recount_stats}</label><div class=\"description\">{$lang->recount_stats_desc}</div>");
$form_container->output_cell($lang->na);
$form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_recountstats")));

	$form_container->construct_row();

$plugins->run_hooks("admin_tools_recount_rebuild_output_list");

	$form_container->construct_row();

$plugins->run_hooks("admin_tools_recount_rebuild_output_list");