cant find this lines
Code: Alles auswählen
#
#-----[ FIND ]------------------------------------------
#
else if ($mode == 'delete_topic')
{
// Get post_id
if (isset($HTTP_POST_VARS[POST_TOPIC_URL]) || isset($HTTP_GET_VARS[POST_TOPIC_URL]))
{
$topic_id = (isset($HTTP_POST_VARS[POST_TOPIC_URL])) ? intval($HTTP_POST_VARS[POST_TOPIC_URL]) : intval($HTTP_GET_VARS[POST_TOPIC_URL]);
}
else
{
$topic_id = 0;
}
if (!empty($topic_id))
{
#
#-----[ AFTER, ADD ]------------------------------------------
#
if (intval($board_config['delete_post_forum']) != 0)
{
$sql = "SELECT * FROM " . FORUMS_TABLE . "
WHERE forum_id = " . $board_config['delete_post_forum'];
if (!$result = $db->sql_query($sql))
{
$result_ar = array(
'result' => AJAX_ERROR,
'error_msg' => 'This topic does not exist'
);
}
$forum_count = $db->sql_numrows($result);
$db->sql_freeresult($result);
$forum_check = ($forum_count != 0) ? TRUE : 0;
}
else
{
$forum_check = 0;
}
#
#-----[ FIND ]------------------------------------------
#
$sql = "DELETE
FROM " . TOPICS_TABLE . "
WHERE topic_id = $topic_id
OR topic_moved_id = $topic_id";
if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
{
$result_ar = array(
'result' => AJAX_ERROR,
'error_msg' => 'Could not delete topics'
);
}
if ( $post_id_sql != '' )
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ($userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD && $board_config['mod_allow_delete_post'] == 1))
{
$sql = "DELETE FROM " . TOPICS_TABLE . "
WHERE topic_id = $topic_id
OR topic_moved_id = $topic_id";
if (!$db->sql_query($sql))
{
$result_ar = array(
'result' => AJAX_ERROR,
'error_msg' => 'Could not delete topics'
);
}
}
else if ($forum_check == TRUE)
{
$sql = "UPDATE " . TOPICS_TABLE . "
SET forum_id = " . $board_config['delete_post_forum'] . "
WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
$result_ar = array(
'result' => AJAX_ERROR,
'error_msg' => 'Could not delete topics'
);
}
$sql = "UPDATE " . POSTS_TABLE . "
SET forum_id = " . $board_config['delete_post_forum'] . "
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
$result_ar = array(
'result' => AJAX_ERROR,
'error_msg' => 'Could not delete topics'
);
}
}
if ( $post_id_sql != '' && ($userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD && $board_config['mod_allow_delete_post'] == 1)))
#
#-----[ FIND ]------------------------------------------
#
if ( $vote_id_sql != '' )
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ( $vote_id_sql != '' && ($userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD && $board_config['mod_allow_delete_post'] == 1)))
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM