Also ich hatte mir gedacht eigentlich brauch ich ja nur die posting.php zu bearbeiten und zwar dann ab der Stelle wo ich den beitrag schließen kann. Ich habe dass hier:
Code: Alles auswählen
else if ($lock)
{
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_status = " . TOPIC_LOCKED . "
WHERE topic_id = " . $t_id . "
AND topic_moved_id = 0";
}
Code: Alles auswählen
//
// START OF THE MOVE TOPICS WHEN LOCKED MODIFICATION
//
// Die nächsten 2 Zeilen sind für die Abfrage in welchem Forum man sich befinden
if($forum_id == 1 || $forum_id == 4 || $forum_id == 5 || $forum_id == 6)
{
// Ab Hier wieder das original
if($board_config['move_when_locked_stat'] != -1 && $board_config['move_when_locked_stat'] == 1)
{
$move_to_forum = $board_config['move_when_locked_id'];
//
// Let's check for special topics :)
//
$sql = "SELECT * FROM " . TOPICS_TABLE . "
WHERE topic_id = " . $t_id . "
AND forum_id = $forum_id
AND topic_moved_id = 0";
if ( !($special_result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
}
while($row = $db->sql_fetchrow($special_result))
{
$move_topic_id_system = $row['topic_id'];
if(($board_config['leave_special_topic_stat'] == -1) || (($board_config['leave_special_topic_stat'] == 1) && (($row['topic_type'] == 1) || ($row['topic_type'] == 0))) || (($board_config['leave_special_topic_stat'] == 2) && ($row['topic_type'] == 0)))
{
//
// Start moving topic and posts
//
$sql = "UPDATE " . TOPICS_TABLE . "
SET forum_id = $move_to_forum
WHERE topic_id = $move_topic_id_system
AND forum_id = $forum_id
AND topic_moved_id = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . POSTS_TABLE . "
SET forum_id = $move_to_forum
WHERE topic_id = $move_topic_id_system
AND forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
}
}
}
//
// Resync index :)
//
// Sync musste ich ganz ausklammern,weil es Fehler gab
// sync('forum', $forum_id);
// sync('forum', $move_to_forum);
}
// Die nächste Zeile ist nur bei der Abfrage der Foren IDs nötig
}
//
// END OF THE MOVE TOPICS WHEN LOCKED MODIFICATION
//