Vergleich admin/maintenance.php - 1.2.1 - 1.2.11

  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 2278 2006-09-27 10:29:17Z chris $

 * $Id: maintenance.php 3300 2007-09-06 02:19:06Z 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 127Zeile 128

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


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

 
	@set_time_limit(0);


	$plugins->run_hooks("admin_maintenance_do_rebuildstats");
$cache->updatestats();
cpredirect("maintenance.php?".SID."&action=rebuild", $lang->stats_rebuilt);

	$plugins->run_hooks("admin_maintenance_do_rebuildstats");
$cache->updatestats();
cpredirect("maintenance.php?".SID."&action=rebuild", $lang->stats_rebuilt);

Zeile 134Zeile 137

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


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

 
	@set_time_limit(0);


	$plugins->run_hooks("admin_maintenance_do_rebuildforums");

$query = $db->simple_select(TABLE_PREFIX."forums", "COUNT(*) as num_forums");
$num_forums = $db->fetch_field($query, 'num_forums');

	$plugins->run_hooks("admin_maintenance_do_rebuildforums");

$query = $db->simple_select(TABLE_PREFIX."forums", "COUNT(*) as num_forums");
$num_forums = $db->fetch_field($query, 'num_forums');

	
if(!isset($mybb->input['page']) || intval($mybb->input['page']) < 1)
{
$mybb->input['page'] = 1;
}
$page = intval($mybb->input['page']);
if(!isset($mybb->input['perpage']) || intval($mybb->input['perpage']) < 1)
{
$mybb->input['perpage'] = 50;

	
if(!isset($mybb->input['page']) || intval($mybb->input['page']) < 1)
{
$mybb->input['page'] = 1;
}
$page = intval($mybb->input['page']);
if(!isset($mybb->input['perpage']) || intval($mybb->input['perpage']) < 1)
{
$mybb->input['perpage'] = 50;

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

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

Zeile 157Zeile 162
	{
$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 181Zeile 186

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


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

 
	@set_time_limit(0);


	$plugins->run_hooks("admin_maintenance_do_rebuildthreads");

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

	$plugins->run_hooks("admin_maintenance_do_rebuildthreads");

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

	
if(!isset($mybb->input['page']) || intval($mybb->input['page']) < 1)
{

	
if(!isset($mybb->input['page']) || intval($mybb->input['page']) < 1)
{

		$mybb->input['page'] = 1;
}
$page = intval($mybb->input['page']);

		$mybb->input['page'] = 1;
}
$page = intval($mybb->input['page']);

Zeile 202Zeile 209
	$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 225Zeile 232
}

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

}

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

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




{
@set_time_limit(0);

$plugins->run_hooks("admin_maintenance_do_recountpostcounts");


	$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(uid) as num_users");
$num_users = $db->fetch_field($query, 'num_users');


	$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(uid) as num_users");
$num_users = $db->fetch_field($query, 'num_users');


Zeile 249Zeile 258
	{
$fids[] = $forum['fid'];
}

	{
$fids[] = $forum['fid'];
}

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




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

	if($fids)
{
$fids = " AND FID NOT IN($fids)";

	if($fids)
{
$fids = " AND FID NOT IN($fids)";

Zeile 263Zeile 275
	
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");
$db->update_query(TABLE_PREFIX."users", array("postnum" => intval($num_posts)), "uid='{$user['uid']}'");
}

if($end >= $num_users)

		$num_posts = $db->fetch_field($query2, "post_count");
$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);
}
else

		cpredirect("maintenance.php?".SID."&action=rebuild", $lang->user_post_counts_rebuilt);
}
else

Zeile 289Zeile 301

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


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

 
	@set_time_limit(0);


	$plugins->run_hooks("admin_maintenance_do_rebuild_thumbnails");

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

	$plugins->run_hooks("admin_maintenance_do_rebuild_thumbnails");

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

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


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


	require_once MYBB_ROOT."/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))