Vergleich admin/maintenance.php - 1.2.0 - 1.2.9

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: maintenance.php 2179 2006-09-01 04:44:17Z chris $

 * $Id: maintenance.php 3030 2007-04-26 00:19:47Z Tikitiki $

 */

define("IN_MYBB", 1);

require_once "./global.php";

 */

define("IN_MYBB", 1);

require_once "./global.php";

 
require_once MYBB_ROOT."/inc/functions_rebuild.php";


// Load language packs for this section
global $lang;


// Load language packs for this section
global $lang;

Zeile 157Zeile 158
	{
$update['parentlist'] = makeparentlist($forum['fid']);
$db->update_query(TABLE_PREFIX."forums", $update, "fid='{$forum['fid']}'");

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

		update_forum_count($forum['fid']);

		rebuild_forum_counters($forum['fid']);

	}

if($end >= $num_forums)

	}

if($end >= $num_forums)

Zeile 175Zeile 176
		makehiddencode('perpage', $per_page);
endtable();
endform($lang->proceed);

		makehiddencode('perpage', $per_page);
endtable();
endform($lang->proceed);

 
		cpfooter();

	}

	}


cpfooter();

 
}

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

}

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

Zeile 203Zeile 203
	$query = $db->simple_select(TABLE_PREFIX."threads", "tid", '', array('order_by' => 'tid', 'order_dir' => 'asc', 'limit_start' => $start, 'limit' => $per_page));
while($thread = $db->fetch_array($query))
{

	$query = $db->simple_select(TABLE_PREFIX."threads", "tid", '', array('order_by' => 'tid', 'order_dir' => 'asc', 'limit_start' => $start, 'limit' => $per_page));
while($thread = $db->fetch_array($query))
{

		update_thread_count($thread['tid']);

		rebuild_thread_counters($thread['tid']);

	}

if($end >= $num_threads)

	}

if($end >= $num_threads)

Zeile 221Zeile 221
		makehiddencode('perpage', $per_page);
endtable();
endform($lang->proceed);

		makehiddencode('perpage', $per_page);
endtable();
endform($lang->proceed);

 
		cpfooter();

	}

	}


cpfooter();

 
}

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

}

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

Zeile 245Zeile 244
	$per_page = intval($mybb->input['perpage']);
$start = ($page-1) * $per_page;
$end = $start + $per_page;

	$per_page = intval($mybb->input['perpage']);
$start = ($page-1) * $per_page;
$end = $start + $per_page;





















	
$query = $db->simple_select(TABLE_PREFIX."forums", "fid", "usepostcounts = 'no'");
while($forum = $db->fetch_array($query))
{
$fids[] = $forum['fid'];
}
if(is_array($fids))
{
$fids = implode(',', $fids);
}
if($fids)
{
$fids = " AND FID NOT IN($fids)";
}
else
{
$fids = "";
}


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

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

 
	

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

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

		$query2 = $db->simple_select(TABLE_PREFIX."posts", "COUNT(pid) AS post_count", "uid='{$user['uid']}' AND visible>0");

		$query2 = $db->simple_select(TABLE_PREFIX."posts", "COUNT(pid) AS post_count", "uid='{$user['uid']}' AND visible>0{$fids}");

		$num_posts = $db->fetch_field($query2, "post_count");

		$num_posts = $db->fetch_field($query2, "post_count");

		$db->update_query(TABLE_PREFIX."users", array("postnum" => intval($num_posts)), "uid='{$user['uid']}'");
}


		$db->update_query(TABLE_PREFIX."users", array("postnum" => intval($num_posts)), "uid='{$user['uid']}'");
}


	if($end >= $num_users)
{
cpredirect("maintenance.php?".SID."&action=rebuild", $lang->user_post_counts_rebuilt);

	if($end >= $num_users)
{
cpredirect("maintenance.php?".SID."&action=rebuild", $lang->user_post_counts_rebuilt);

Zeile 269Zeile 287
		makehiddencode('perpage', $per_page);
endtable();
endform($lang->proceed);

		makehiddencode('perpage', $per_page);
endtable();
endform($lang->proceed);

 
		cpfooter();

	}

	}


cpfooter();

 
}

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

}

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

{
$plugins->run_hooks("admin_maintenance_do_rebuild_thumbnails");


{
$plugins->run_hooks("admin_maintenance_do_rebuild_thumbnails");


	$query = $db->simple_select(TABLE_PREFIX."attachments", "COUNT(aid) as num_attachments");
$num_attachments = $db->fetch_field($query, 'num_attachments');


	$query = $db->simple_select(TABLE_PREFIX."attachments", "COUNT(aid) as num_attachments");
$num_attachments = $db->fetch_field($query, 'num_attachments');


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


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


	require_once "../inc/functions_image.php";

	require_once MYBB_ROOT."inc/functions_image.php";

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

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

Zeile 327Zeile 344
		makehiddencode('perpage', $per_page);
endtable();
endform($lang->proceed);

		makehiddencode('perpage', $per_page);
endtable();
endform($lang->proceed);

 
		cpfooter();

	}

	}


cpfooter();

 
}

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

}

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

Zeile 349Zeile 365
	tableheader($lang->rebuild_forum_counters);
makelabelcode("<div align=\"center\">{$lang->rebuild_forum_counters_note}</div>", '', 2);
makeinputcode($lang->forums_per_page, 'perpage', 50);

	tableheader($lang->rebuild_forum_counters);
makelabelcode("<div align=\"center\">{$lang->rebuild_forum_counters_note}</div>", '', 2);
makeinputcode($lang->forums_per_page, 'perpage', 50);

	makehiddencode('page', 1);

 
	endtable();

	endtable();

 
	makehiddencode('page', 1);

	endform($lang->proceed);

startform("maintenance.php", "" , "do_rebuildthreads");

	endform($lang->proceed);

startform("maintenance.php", "" , "do_rebuildthreads");

Zeile 358Zeile 374
	tableheader($lang->rebuild_thread_counters);
makelabelcode("<div align=\"center\">{$lang->rebuild_thread_counters_note}</div>", '', 2);
makeinputcode($lang->threads_per_page, 'perpage', 500);

	tableheader($lang->rebuild_thread_counters);
makelabelcode("<div align=\"center\">{$lang->rebuild_thread_counters_note}</div>", '', 2);
makeinputcode($lang->threads_per_page, 'perpage', 500);

	makehiddencode('page', 1);
endtable();
endform($lang->proceed);

	endtable();
makehiddencode('page', 1);
endform($lang->proceed);

	
startform("maintenance.php", "" , "do_recountpostcounts");

	
startform("maintenance.php", "" , "do_recountpostcounts");

	starttable();

	starttable();

	tableheader($lang->recount_user_post_counts);
makelabelcode("<div align=\"center\">{$lang->recount_user_post_counts_note}</div>", '', 2);
makeinputcode($lang->users_per_page, 'perpage', 500);

	tableheader($lang->recount_user_post_counts);
makelabelcode("<div align=\"center\">{$lang->recount_user_post_counts_note}</div>", '', 2);
makeinputcode($lang->users_per_page, 'perpage', 500);

	makehiddencode('page', 1);
endtable();

	endtable();
makehiddencode('page', 1);

	endform($lang->proceed);

startform("maintenance.php", "" , "do_rebuildthumbnails");

	endform($lang->proceed);

startform("maintenance.php", "" , "do_rebuildthumbnails");

Zeile 376Zeile 392
	tableheader($lang->rebuild_thumbnails);
makelabelcode("<div align=\"center\">{$lang->rebuild_thumbnails_note}</div>", '', 2);
makeinputcode($lang->thumbnails_per_page, 'perpage', 20);

	tableheader($lang->rebuild_thumbnails);
makelabelcode("<div align=\"center\">{$lang->rebuild_thumbnails_note}</div>", '', 2);
makeinputcode($lang->thumbnails_per_page, 'perpage', 20);

	makehiddencode('page', 1);

 
	endtable();

	endtable();

 
	makehiddencode('page', 1);

	endform($lang->proceed);

	endform($lang->proceed);

 
	cpfooter();

}
?>

}
?>