k heb het nog es ff uitgezocht en ik denk dat het met deze mod heeft te maken:
Move topics when locked.
want de error verwijst naar het bestand modcp.php
klopt alles wel gewoon in deze code?
Code: Selecteer alles
#
#-----[ OPEN ]------------------------------------------
#
modcp.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_status = " . TOPIC_LOCKED . "
WHERE topic_id IN ($topic_id_sql)
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);
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// START OF THE MOVE TOPICS WHEN LOCKED MODIFICATION
//
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 IN ($topic_id_sql)
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('forum', $forum_id);
sync('forum', $move_to_forum);
}
//
// END OF THE MOVE TOPICS WHEN LOCKED MODIFICATION
//