Dann kommt das:
[phpBB Debug] PHP Notice: in file /includes/functions_admin.php on line 454: Undefined variable: post_id
Aber ich habe herausgefunden aus welchem mod der fehler kommt, nämlich vom user reputation points mod.
Hier der teil aus der anleitung:
Open: includes/functions_admin.php
Find
Tip: This may be a partial find and not the whole line.
Code: Select All
foreach ($table_ary as $table)
{
$sql = "DELETE FROM $table
WHERE " . $db->sql_in_set('post_id', $post_ids);
$db->sql_query($sql);
}
unset($table_ary);
Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All
// user reputation points
$sql = 'DELETE FROM ' . REPUTATIONS_TABLE . '
WHERE ' . $db->sql_in_set('rep_post_id', $post_ids);
$db->sql_query($sql);
// end
und hier die betreffende stelle aus meiner datei:
Code: Alles auswählen
while ($row = $db->sql_fetchrow($result))
{
$forum_ids[] = $row['forum_id'];
}
$db->sql_freeresult($result);
}
$table_ary = array(TOPICS_TABLE, POSTS_TABLE, LOG_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
foreach ($table_ary as $table)
{
$sql = "UPDATE $table
SET forum_id = $forum_id
WHERE " . $db->sql_in_set('topic_id', $topic_ids);
$db->sql_query($sql);
}
unset($table_ary);
// user reputation points
$sql = 'DELETE FROM ' . REPUTATIONS_TABLE . '
WHERE ' . $db->sql_in_set('rep_post_id', $post_ids);
$db->sql_query($sql);
// end
if ($auto_sync)
{
sync('forum', 'forum_id', $forum_ids, true, true);
unset($forum_ids);
}
}
/**
* Move post(s)
*/
function move_posts($post_ids, $topic_id, $auto_sync = true)
{
global $db;
if (!is_array($post_ids))
{
$post_ids = array($post_ids);
}
$forum_ids = array();
$topic_ids = array($topic_id);
$sql = 'SELECT DISTINCT topic_id, forum_id
FROM ' . POSTS_TABLE . '
WHERE ' . $db->sql_in_set('post_id', $post_ids);
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$forum_ids[] = $row['forum_id'];
$topic_ids[] = $row['topic_id'];
}
$db->sql_freeresult($result);
$sql = 'SELECT forum_id
FROM ' . TOPICS_TABLE . '
WHERE topic_id = ' . $topic_id;
$result = $db->sql_query($sql);
$forum_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$forum_row)
{
trigger_error('NO_TOPIC');
}
$sql = 'UPDATE ' . POSTS_TABLE . '
SET forum_id = ' . $forum_row['forum_id'] . ", topic_id = $topic_id
WHERE " . $db->sql_in_set('post_id', $post_ids);
$db->sql_query($sql);
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . "
SET topic_id = $topic_id, in_message = 0
WHERE " . $db->sql_in_set('post_msg_id', $post_ids);
$db->sql_query($sql);
if ($auto_sync)
{
$forum_ids[] = $forum_row['forum_id'];
sync('topic_reported', 'topic_id', $topic_ids);
sync('topic_attachment', 'topic_id', $topic_ids);
sync('topic', 'topic_id', $topic_ids, true);
sync('forum', 'forum_id', $forum_ids, true, true);