mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 22:08:54 +00:00
err, forgot to commit
git-svn-id: file:///svn/phpbb/trunk@7961 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
92c25a3e6c
commit
acf0c0ddeb
18 changed files with 94 additions and 94 deletions
|
@ -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'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
);
|
||||
|
||||
|
|
|
@ -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]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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]
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
);
|
||||
|
|
|
@ -97,7 +97,7 @@ function phpbb_insert_forums()
|
|||
while ($row = $src_db->sql_fetchrow($result))
|
||||
{
|
||||
$sql_ary = array(
|
||||
'forum_id' => $max_forum_id,
|
||||
'forum_id' => (int) $max_forum_id,
|
||||
'forum_name' => ($row['cat_title']) ? htmlspecialchars(phpbb_set_default_encoding($row['cat_title']), ENT_COMPAT, 'UTF-8') : $user->lang['CATEGORY'],
|
||||
'parent_id' => 0,
|
||||
'forum_parents' => '',
|
||||
|
@ -113,8 +113,8 @@ function phpbb_insert_forums()
|
|||
$cat_row = $db->sql_fetchrow($_result);
|
||||
$db->sql_freeresult($_result);
|
||||
|
||||
$sql_ary['left_id'] = $cat_row['right_id'] + 1;
|
||||
$sql_ary['right_id'] = $cat_row['right_id'] + 2;
|
||||
$sql_ary['left_id'] = (int) ($cat_row['right_id'] + 1);
|
||||
$sql_ary['right_id'] = (int) ($cat_row['right_id'] + 2);
|
||||
|
||||
$sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
$db->sql_query($sql);
|
||||
|
@ -148,8 +148,8 @@ function phpbb_insert_forums()
|
|||
$unknown_cat_id = 'ghost';
|
||||
|
||||
$sql_ary = array(
|
||||
'forum_id' => $max_forum_id,
|
||||
'forum_name' => $user->lang['CATEGORY'],
|
||||
'forum_id' => (int) $max_forum_id,
|
||||
'forum_name' => (string) $user->lang['CATEGORY'],
|
||||
'parent_id' => 0,
|
||||
'forum_parents' => '',
|
||||
'forum_desc' => '',
|
||||
|
@ -164,8 +164,8 @@ function phpbb_insert_forums()
|
|||
$cat_row = $db->sql_fetchrow($_result);
|
||||
$db->sql_freeresult($_result);
|
||||
|
||||
$sql_ary['left_id'] = $cat_row['right_id'] + 1;
|
||||
$sql_ary['right_id'] = $cat_row['right_id'] + 2;
|
||||
$sql_ary['left_id'] = (int) ($cat_row['right_id'] + 1);
|
||||
$sql_ary['right_id'] = (int) ($cat_row['right_id'] + 2);
|
||||
|
||||
$sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
$db->sql_query($sql);
|
||||
|
@ -210,7 +210,7 @@ function phpbb_insert_forums()
|
|||
$sql_ary = array(
|
||||
'forum_id' => (int) $row['forum_id'],
|
||||
'forum_name' => htmlspecialchars(phpbb_set_default_encoding($row['forum_name']), ENT_COMPAT, 'UTF-8'),
|
||||
'parent_id' => $cats_added[$row['cat_id']],
|
||||
'parent_id' => (int) $cats_added[$row['cat_id']],
|
||||
'forum_parents' => '',
|
||||
'forum_desc' => htmlspecialchars(phpbb_set_default_encoding($row['forum_desc']), ENT_COMPAT, 'UTF-8'),
|
||||
'forum_type' => FORUM_POST,
|
||||
|
@ -269,8 +269,8 @@ function phpbb_insert_forums()
|
|||
WHERE ' . $cat_row['left_id'] . ' BETWEEN left_id AND right_id';
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql_ary['left_id'] = $cat_row['right_id'];
|
||||
$sql_ary['right_id'] = $cat_row['right_id'] + 1;
|
||||
$sql_ary['left_id'] = (int) $cat_row['right_id'];
|
||||
$sql_ary['right_id'] = (int) ($cat_row['right_id'] + 1);
|
||||
|
||||
$sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
$db->sql_query($sql);
|
||||
|
@ -1778,7 +1778,7 @@ function phpbb_check_username_collisions()
|
|||
while ($row = $src_db->sql_fetchrow($result))
|
||||
{
|
||||
$clean_name = utf8_clean_string(phpbb_set_default_encoding($row['username']));
|
||||
$insert_ary[] = array('user_id' => $row['user_id'], 'username_clean' => $clean_name);
|
||||
$insert_ary[] = array('user_id' => (int) $row['user_id'], 'username_clean' => (string) $clean_name);
|
||||
|
||||
if ($i % 1000 == 999)
|
||||
{
|
||||
|
|
|
@ -1738,12 +1738,12 @@ class install_install extends module
|
|||
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['lang_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['lang_iso'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1835,10 +1835,10 @@ class install_install extends module
|
|||
|
||||
$sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||
'bot_active' => 1,
|
||||
'bot_name' => $bot_name,
|
||||
'user_id' => $user_id,
|
||||
'bot_agent' => $bot_ary[0],
|
||||
'bot_ip' => $bot_ary[1],
|
||||
'bot_name' => (string) $bot_name,
|
||||
'user_id' => (int) $user_id,
|
||||
'bot_agent' => (string) $bot_ary[0],
|
||||
'bot_ip' => (string) $bot_ary[1],
|
||||
));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
|
|
@ -476,12 +476,12 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && (
|
|||
if (confirm_box(true))
|
||||
{
|
||||
$sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||
'user_id' => $user->data['user_id'],
|
||||
'topic_id' => $topic_id,
|
||||
'forum_id' => $forum_id,
|
||||
'save_time' => $current_time,
|
||||
'draft_subject' => $subject,
|
||||
'draft_message' => $message)
|
||||
'user_id' => (int) $user->data['user_id'],
|
||||
'topic_id' => (int) $topic_id,
|
||||
'forum_id' => (int) $forum_id,
|
||||
'save_time' => (int) $current_time,
|
||||
'draft_subject' => (string) $subject,
|
||||
'draft_message' => (string) $message)
|
||||
);
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@
|
|||
<div class="topic-actions">
|
||||
<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
|
||||
<div class="buttons">
|
||||
<div class="post-icon"><a href="{U_POST_NEW_TOPIC}"><span>{L_POST_REPLY}</span></a></div>
|
||||
<div class="post-icon"><a href="{U_POST_NEW_TOPIC}"><span>{L_POST_TOPIC}</span></a></div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue