diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_language.php | 12 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_main.php | 4 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 18 | ||||
-rw-r--r-- | phpBB/includes/acp/auth.php | 6 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 14 | ||||
-rw-r--r-- | phpBB/includes/functions_admin.php | 16 | ||||
-rw-r--r-- | phpBB/includes/functions_convert.php | 6 | ||||
-rw-r--r-- | phpBB/includes/functions_user.php | 22 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_forum.php | 2 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 6 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_topic.php | 4 | ||||
-rwxr-xr-x | phpBB/includes/search/fulltext_native.php | 8 | ||||
-rw-r--r-- | phpBB/includes/session.php | 12 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_zebra.php | 2 |
14 files changed, 66 insertions, 66 deletions
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php index 266729765d..ff827c5141 100644 --- a/phpBB/includes/acp/acp_language.php +++ b/phpBB/includes/acp/acp_language.php @@ -800,12 +800,12 @@ class acp_language if (in_array($image_name, $valid_localized)) { $sql_ary[] = array( - 'image_name' => $image_name, - 'image_filename' => $image_filename, - 'image_height' => $image_height, - 'image_width' => $image_width, - 'imageset_id' => $imageset_row['imageset_id'], - 'image_lang' => $lang_pack['iso'], + 'image_name' => (string) $image_name, + 'image_filename' => (string) $image_filename, + 'image_height' => (int) $image_height, + 'image_width' => (int) $image_width, + 'imageset_id' => (int) $imageset_row['imageset_id'], + 'image_lang' => (string) $lang_pack['iso'], ); } } diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index 5f1e32fb51..84ea8cdfbd 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -251,8 +251,8 @@ class acp_main foreach ($topic_row as $topic_id) { $sql_ary[] = array( - 'user_id' => $user_id, - 'topic_id' => $topic_id, + 'user_id' => (int) $user_id, + 'topic_id' => (int) $topic_id, 'topic_posted' => 1, ); } diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 74659fe792..00c5e9adc7 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -412,11 +412,11 @@ parse_css_file = {PARSE_CSS_FILE} if (in_array($image_name, $imageset_definitions)) { $sql_ary[] = array( - 'image_name' => $image_name, - 'image_filename' => $image_filename, + 'image_name' => (string) $image_name, + 'image_filename' => (string) $image_filename, 'image_height' => (int) $image_height, 'image_width' => (int) $image_width, - 'imageset_id' => $style_id, + 'imageset_id' => (int) $style_id, 'image_lang' => '', ); } @@ -458,12 +458,12 @@ parse_css_file = {PARSE_CSS_FILE} if (in_array($image_name, $imageset_definitions)) { $sql_ary[] = array( - 'image_name' => $image_name, - 'image_filename' => $image_filename, - 'image_height' => $image_height, - 'image_width' => $image_width, - 'imageset_id' => $style_id, - 'image_lang' => $row['lang_dir'], + 'image_name' => (string) $image_name, + 'image_filename' => (string) $image_filename, + 'image_height' => (int) $image_height, + 'image_width' => (int) $image_width, + 'imageset_id' => (int) $style_id, + 'image_lang' => (string) $row['lang_dir'], ); } } diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index b5ae092954..e3514833b5 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -765,7 +765,7 @@ class auth_admin extends auth foreach ($option_ary as $option) { $sql_ary[] = array( - 'auth_option' => $option, + 'auth_option' => (string) $option, 'is_global' => ($type == 'global' || $type == 'local_global') ? 1 : 0, 'is_local' => ($type == 'local' || $type == 'local_global') ? 1 : 0 ); @@ -879,7 +879,7 @@ class auth_admin extends auth 'forum_id' => (int) $forum, 'auth_option_id' => 0, 'auth_setting' => 0, - 'auth_role_id' => $role_id + 'auth_role_id' => (int) $role_id, ); } } @@ -960,7 +960,7 @@ class auth_admin extends auth { $sql_ary[] = array( 'role_id' => (int) $role_id, - 'auth_option_id' => $this->option_ids[$flag], + 'auth_option_id' => (int) $this->option_ids[$flag], 'auth_setting' => ACL_NEVER ); } diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 9a97bd7ece..daff12e3a8 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -848,8 +848,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ foreach ($sql_insert as $f_id) { $sql_ary[] = array( - 'user_id' => $user->data['user_id'], - 'forum_id' => $f_id, + 'user_id' => (int) $user->data['user_id'], + 'forum_id' => (int) $f_id, 'mark_time' => time() ); } @@ -918,10 +918,10 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ $db->sql_return_on_error(true); $sql_ary = array( - 'user_id' => $user->data['user_id'], - 'topic_id' => $topic_id, + 'user_id' => (int) $user->data['user_id'], + 'topic_id' => (int) $topic_id, 'forum_id' => (int) $forum_id, - 'mark_time' => ($post_time) ? $post_time : time(), + 'mark_time' => ($post_time) ? (int) $post_time : time(), ); $db->sql_query('INSERT INTO ' . TOPICS_TRACK_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); @@ -1005,8 +1005,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ $db->sql_return_on_error(true); $sql_ary = array( - 'user_id' => $use_user_id, - 'topic_id' => $topic_id, + 'user_id' => (int) $use_user_id, + 'topic_id' => (int) $topic_id, 'topic_posted' => 1 ); diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 64358cbdf4..7074f21f25 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -1079,8 +1079,8 @@ function update_posted_info(&$topic_ids) foreach ($topic_row as $topic_id) { $sql_ary[] = array( - 'user_id' => $user_id, - 'topic_id' => $topic_id, + 'user_id' => (int) $user_id, + 'topic_id' => (int) $topic_id, 'topic_posted' => 1, ); } @@ -2244,9 +2244,9 @@ function cache_moderators() foreach ($forum_id_ary as $forum_id => $auth_ary) { $sql_ary[] = array( - 'forum_id' => $forum_id, - 'user_id' => $user_id, - 'username' => $usernames_ary[$user_id], + 'forum_id' => (int) $forum_id, + 'user_id' => (int) $user_id, + 'username' => (string) $usernames_ary[$user_id], 'group_id' => 0, 'group_name' => '' ); @@ -2307,11 +2307,11 @@ function cache_moderators() } $sql_ary[] = array( - 'forum_id' => $forum_id, + 'forum_id' => (int) $forum_id, 'user_id' => 0, 'username' => '', - 'group_id' => $group_id, - 'group_name' => $groupnames_ary[$group_id] + 'group_id' => (int) $group_id, + 'group_name' => (string) $groupnames_ary[$group_id] ); } } diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index 98d15abb84..159ec387bd 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -1707,9 +1707,9 @@ function add_default_groups() 'group_desc_uid' => '', 'group_desc_bitfield' => '', 'group_type' => GROUP_SPECIAL, - 'group_colour' => $data[0], - 'group_legend' => $data[1], - 'group_founder_manage' => $data[2] + 'group_colour' => (string) $data[0], + 'group_legend' => (int) $data[1], + 'group_founder_manage' => (int) $data[2] ); } diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 2ebcc30e81..0194ec06a4 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -766,7 +766,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas { do { - $banlist_ary[] = $row['user_id']; + $banlist_ary[] = (int) $row['user_id']; } while ($row = $db->sql_fetchrow($result)); } @@ -849,7 +849,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas else if (preg_match('#^\*$#', trim($ban_item))) { // Ban all IPs - $banlist_ary[] = "*"; + $banlist_ary[] = '*'; } else if (preg_match('#^([\w\-_]\.?){2,}$#is', trim($ban_item))) { @@ -959,11 +959,11 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas { $sql_ary[] = array( $type => $ban_entry, - 'ban_start' => $current_time, - 'ban_end' => $ban_end, - 'ban_exclude' => $ban_exclude, - 'ban_reason' => $ban_reason, - 'ban_give_reason' => $ban_give_reason, + 'ban_start' => (int) $current_time, + 'ban_end' => (int) $ban_end, + 'ban_exclude' => (int) $ban_exclude, + 'ban_reason' => (string) $ban_reason, + 'ban_give_reason' => (string) $ban_give_reason, ); } @@ -2574,10 +2574,10 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false, foreach ($add_id_ary as $user_id) { $sql_ary[] = array( - 'user_id' => $user_id, - 'group_id' => $group_id, - 'group_leader' => $leader, - 'user_pending' => $pending, + 'user_id' => (int) $user_id, + 'group_id' => (int) $group_id, + 'group_leader' => (int) $leader, + 'user_pending' => (int) $pending, ); } diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index 4059e77d39..d4c6f1f395 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -396,7 +396,7 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id) // If the topic no longer exist, we will update the topic watch table. // To not let it error out on users watching both topics, we just return on an error... $db->sql_return_on_error(true); - $db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . $to_topic_id . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids)); + $db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids)); $db->sql_return_on_error(false); $db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids)); diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index a8f6985089..199a54032a 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -1132,9 +1132,9 @@ function mcp_fork_topic($topic_ids) while ($row = $db->sql_fetchrow($result)) { $sql_ary[] = array( - 'topic_id' => $new_topic_id, - 'user_id' => $row['user_id'], - 'notify_status' => $row['notify_status'], + 'topic_id' => (int) $new_topic_id, + 'user_id' => (int) $row['user_id'], + 'notify_status' => (int) $row['notify_status'], ); } $db->sql_freeresult($result); diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index aefea01e4b..a5bfba23fe 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -572,10 +572,10 @@ function merge_posts($topic_id, $to_topic_id) // If the topic no longer exist, we will update the topic watch table. // To not let it error out on users watching both topics, we just return on an error... $db->sql_return_on_error(true); - $db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . $to_topic_id . ' WHERE topic_id = ' . $topic_id); + $db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE topic_id = ' . (int) $topic_id); $db->sql_return_on_error(false); - $db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE topic_id = ' . $topic_id); + $db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE topic_id = ' . (int) $topic_id); } // Link to the new topic diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index e99d94bc53..ac3fc14f4f 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -1134,7 +1134,7 @@ class fulltext_native extends search_backend foreach ($new_words as $word) { - $sql_ary[] = array('word_text' => $word, 'word_count' => 0); + $sql_ary[] = array('word_text' => (string) $word, 'word_count' => 0); } $db->sql_return_on_error(true); $db->sql_multi_insert(SEARCH_WORDLIST_TABLE, $sql_ary); @@ -1183,9 +1183,9 @@ class fulltext_native extends search_backend if (sizeof($word_ary)) { - $sql = 'INSERT INTO ' . SEARCH_WORDMATCH_TABLE . " (post_id, word_id, title_match) - SELECT $post_id, word_id, $title_match - FROM " . SEARCH_WORDLIST_TABLE . ' + $sql = 'INSERT INTO ' . SEARCH_WORDMATCH_TABLE . ' (post_id, word_id, title_match) + SELECT ' . (int) $post_id . ', word_id, ' . (int) $title_match . ' + FROM ' . SEARCH_WORDLIST_TABLE . ' WHERE ' . $db->sql_in_set('word_text', $word_ary); $db->sql_query($sql); diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index a100723972..275618f7dc 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -1453,12 +1453,12 @@ class user extends session { $image_name = substr($image_name, 4); $sql_ary[] = array( - 'image_name' => $image_name, - 'image_filename' => $image_filename, - 'image_height' => $image_height, - 'image_width' => $image_width, - 'imageset_id' => $this->theme['imageset_id'], - 'image_lang' => $this->img_lang, + 'image_name' => (string) $image_name, + 'image_filename' => (string) $image_filename, + 'image_height' => (int) $image_height, + 'image_width' => (int) $image_width, + 'imageset_id' => (int) $this->theme['imageset_id'], + 'image_lang' => (string) $this->img_lang, ); } } diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index 3c9abfe5b4..49ba7329be 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -157,7 +157,7 @@ class ucp_zebra foreach ($user_id_ary as $zebra_id) { $sql_ary[] = array( - 'user_id' => $user->data['user_id'], + 'user_id' => (int) $user->data['user_id'], 'zebra_id' => (int) $zebra_id, $sql_mode => 1 ); |