A few more missed intval's

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@2503 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2002-04-07 14:59:33 +00:00
parent e924dd61d2
commit 23e3c0a1a7
3 changed files with 5 additions and 5 deletions

View file

@ -343,7 +343,7 @@ switch( $mode )
$topics = $HTTP_POST_VARS['topic_id_list']; $topics = $HTTP_POST_VARS['topic_id_list'];
for($i = 0; $i < count($topics); $i++) for($i = 0; $i < count($topics); $i++)
{ {
$hidden_fields .= '<input type="hidden" name="topic_id_list[]" value="' . $topics[$i] . '" />'; $hidden_fields .= '<input type="hidden" name="topic_id_list[]" value="' . intval($topics[$i]) . '" />';
} }
} }
else else
@ -391,7 +391,7 @@ switch( $mode )
$topic_list = ''; $topic_list = '';
for($i = 0; $i < count($topics); $i++) for($i = 0; $i < count($topics); $i++)
{ {
$topic_list .= ( ( $topic_list != '' ) ? ', ' : '' ) . $topics[$i]; $topic_list .= ( ( $topic_list != '' ) ? ', ' : '' ) . intval($topics[$i]);
} }
$sql = "SELECT * $sql = "SELECT *
@ -624,7 +624,7 @@ switch( $mode )
message_die(GENERAL_MESSAGE, $lang['Empty_subject']); message_die(GENERAL_MESSAGE, $lang['Empty_subject']);
} }
$new_forum_id = $HTTP_POST_VARS['new_forum_id']; $new_forum_id = intval($HTTP_POST_VARS['new_forum_id']);
$topic_time = time(); $topic_time = time();
$sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type) $sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type)

View file

@ -442,7 +442,7 @@ else if ( $mode == 'vote' )
// //
if ( !empty($HTTP_POST_VARS['vote_id']) ) if ( !empty($HTTP_POST_VARS['vote_id']) )
{ {
$vote_option_id = $HTTP_POST_VARS['vote_id']; $vote_option_id = intval($HTTP_POST_VARS['vote_id']);
$sql = "SELECT vd.vote_id $sql = "SELECT vd.vote_id
FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr

View file

@ -34,7 +34,7 @@ if ( isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_U
} }
else if ( isset($HTTP_GET_VARS['forum'])) else if ( isset($HTTP_GET_VARS['forum']))
{ {
$forum_id = $HTTP_GET_VARS['forum']; $forum_id = intval($HTTP_GET_VARS['forum']);
} }
else else
{ {