Vergleich admin/modules/tools/recount_rebuild.php - 1.8.21 - 1.8.29

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 111Zeile 111
	$start = ($page-1) * $per_page;
$end = $start + $per_page;


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


 
	$fids = array();

	$query = $db->simple_select("forums", "fid", "usepostcounts = 0");
while($forum = $db->fetch_array($query))
{
$fids[] = $forum['fid'];
}

	$query = $db->simple_select("forums", "fid", "usepostcounts = 0");
while($forum = $db->fetch_array($query))
{
$fids[] = $forum['fid'];
}

	if(is_array($fids))
{
$fids = implode(',', $fids);
}
if($fids)

	if(!empty($fids))





	{

	{

 
		$fids = implode(',', $fids);

		$fids = " AND p.fid NOT IN($fids)";
}
else
{

		$fids = " AND p.fid NOT IN($fids)";
}
else
{

		$fids = "";

		$fids = '';

	}

$query = $db->simple_select("users", "uid", '', array('order_by' => 'uid', 'order_dir' => 'asc', 'limit_start' => $start, 'limit' => $per_page));

	}

$query = $db->simple_select("users", "uid", '', array('order_by' => 'uid', 'order_dir' => 'asc', 'limit_start' => $start, 'limit' => $per_page));

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


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


 
	$fids = array();

	$query = $db->simple_select("forums", "fid", "usethreadcounts = 0");
while($forum = $db->fetch_array($query))
{
$fids[] = $forum['fid'];
}

	$query = $db->simple_select("forums", "fid", "usethreadcounts = 0");
while($forum = $db->fetch_array($query))
{
$fids[] = $forum['fid'];
}

	if(is_array($fids))
{
$fids = implode(',', $fids);
}
if($fids)

	if(!empty($fids))





	{

	{

 
		$fids = implode(',', $fids);

		$fids = " AND t.fid NOT IN($fids)";
}
else
{

		$fids = " AND t.fid NOT IN($fids)";
}
else
{

		$fids = "";

		$fids = '';

	}

$query = $db->simple_select("users", "uid", '', array('order_by' => 'uid', 'order_dir' => 'asc', 'limit_start' => $start, 'limit' => $per_page));

	}

$query = $db->simple_select("users", "uid", '', array('order_by' => 'uid', 'order_dir' => 'asc', 'limit_start' => $start, 'limit' => $per_page));

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


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


	$uploadspath = $mybb->settings['uploadspath'];
if(my_substr($uploadspath, 0, 1) == '.')
{
$uploadspath = MYBB_ROOT . $mybb->settings['uploadspath'];
}


	$uploadspath_abs = mk_path_abs($mybb->settings['uploadspath']);






	require_once MYBB_ROOT."inc/functions_image.php";

$query = $db->simple_select("attachments", "*", '', array('order_by' => 'aid', 'order_dir' => 'asc', 'limit_start' => $start, 'limit' => $per_page));
while($attachment = $db->fetch_array($query))

	require_once MYBB_ROOT."inc/functions_image.php";

$query = $db->simple_select("attachments", "*", '', array('order_by' => 'aid', 'order_dir' => 'asc', 'limit_start' => $start, 'limit' => $per_page));
while($attachment = $db->fetch_array($query))

	{

	{

		$ext = my_strtolower(my_substr(strrchr($attachment['filename'], "."), 1));
if($ext == "gif" || $ext == "png" || $ext == "jpg" || $ext == "jpeg" || $ext == "jpe")
{
$thumbname = str_replace(".attach", "_thumb.$ext", $attachment['attachname']);

		$ext = my_strtolower(my_substr(strrchr($attachment['filename'], "."), 1));
if($ext == "gif" || $ext == "png" || $ext == "jpg" || $ext == "jpeg" || $ext == "jpe")
{
$thumbname = str_replace(".attach", "_thumb.$ext", $attachment['attachname']);

			$thumbnail = generate_thumbnail($uploadspath."/".$attachment['attachname'], $uploadspath, $thumbname, $mybb->settings['attachthumbh'], $mybb->settings['attachthumbw']);

			$thumbnail = generate_thumbnail($uploadspath_abs."/".$attachment['attachname'], $uploadspath_abs, $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']}'");
}

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

	}


	}


	check_proceed($num_attachments, $end, ++$page, $per_page, "attachmentthumbs", "do_rebuildattachmentthumbs", $lang->success_rebuilt_attachment_thumbnails);
}


	check_proceed($num_attachments, $end, ++$page, $per_page, "attachmentthumbs", "do_rebuildattachmentthumbs", $lang->success_rebuilt_attachment_thumbnails);
}


Zeile 407Zeile 399
	global $page, $lang;

if($finish >= $current)

	global $page, $lang;

if($finish >= $current)

	{

	{

		flash_message($message, 'success');
admin_redirect("index.php?module=tools-recount_rebuild");
}

		flash_message($message, 'success');
admin_redirect("index.php?module=tools-recount_rebuild");
}

Zeile 420Zeile 412
		echo $form->generate_hidden_field("page", $next_page);
echo $form->generate_hidden_field($name, $per_page);
echo $form->generate_hidden_field($name2, $lang->go);

		echo $form->generate_hidden_field("page", $next_page);
echo $form->generate_hidden_field($name, $per_page);
echo $form->generate_hidden_field($name2, $lang->go);

		echo "<div class=\"confirm_action\">\n";
echo "<p>{$lang->confirm_proceed_rebuild}</p>\n";
echo "<br />\n";
echo "<script type=\"text/javascript\">
$(function() {
var button = $(\"#proceed_button\");
if(button.length > 0) {
button.val(\"{$lang->automatically_redirecting}\");
button.attr(\"disabled\", true);
button.css(\"color\", \"#aaa\");
button.css(\"borderColor\", \"#aaa\");

var parent_form = button.closest('form');

if (parent_form.length > 0) {
parent_form.submit();
}
}
});
</script>";
echo "<p class=\"buttons\">\n";
echo $form->generate_submit_button($lang->proceed, array('class' => 'button_yes', 'id' => 'proceed_button'));
echo "</p>\n";
echo "</div>\n";

		output_auto_redirect($form, $lang->confirm_proceed_rebuild);

























$form->end();



$form->end();