1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 16:27:38 +02:00

- Modules are not added correctly [#6370]

- Minor bug in ucp_prefs_personal.html (Opera) [#6348]
- MCP-Warnings section colspan problem in Opera [#6338]
- Loading extensions on install [#6332]
- Adjust PM rules if folder removed [#6326]
- #6318
- Coppa registration [#6306]
- Quick-Mod Topic Type Changes Fail when Topic == Global [#6228]
- added the possibility to change topic type for more than one topic (within mcp)


git-svn-id: file:///svn/phpbb/trunk@6781 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-12-18 17:29:39 +00:00
parent 4e5466d276
commit 7ca8a4a662
17 changed files with 158 additions and 59 deletions

View File

@@ -16,6 +16,8 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
global $template, $db, $user, $auth, $cache;
global $phpEx, $phpbb_root_path, $config;
$user->add_lang('viewtopic');
include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
$url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . extra_url());
@@ -78,6 +80,9 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
'S_CAN_SYNC' => $auth->acl_get('m_', $forum_id),
'S_CAN_APPROVE' => $auth->acl_get('m_approve', $forum_id),
'S_MERGE_SELECT' => ($action == 'merge_select') ? true : false,
'S_CAN_MAKE_NORMAL' => $auth->acl_gets('f_sticky', 'f_announce', $forum_id),
'S_CAN_MAKE_STICKY' => $auth->acl_get('f_sticky', $forum_id),
'S_CAN_MAKE_ANNOUNCE' => $auth->acl_get('f_announce', $forum_id),
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
'U_VIEW_FORUM_LOGS' => ($auth->acl_gets('a_', 'm_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=logs&mode=forum_logs&f=' . $forum_id) : '',

View File

@@ -312,13 +312,13 @@ function change_topic_type($action, $topic_ids)
break;
}
$redirect = request_var('redirect', $user->data['session_page']);
$redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod')));
$s_hidden_fields = build_hidden_fields(array(
$s_hidden_fields = array(
'topic_id_list' => $topic_ids,
'f' => $forum_id,
'action' => $action,
'redirect' => $redirect)
'redirect' => $redirect,
);
$success_msg = '';
@@ -333,22 +333,24 @@ function change_topic_type($action, $topic_ids)
$db->sql_query($sql);
// Reset forum id if a global topic is within the array
if ($forum_id)
$to_forum_id = request_var('to_forum_id', 0);
if ($to_forum_id)
{
$sql = 'UPDATE ' . TOPICS_TABLE . "
SET topic_type = $new_topic_type, forum_id = $forum_id
SET topic_type = $new_topic_type, forum_id = $to_forum_id
WHERE " . $db->sql_in_set('topic_id', $topic_ids) . '
AND forum_id = 0';
$db->sql_query($sql);
// Update forum_ids for all posts
$sql = 'UPDATE ' . POSTS_TABLE . "
SET forum_id = $forum_id
SET forum_id = $to_forum_id
WHERE " . $db->sql_in_set('topic_id', $topic_ids) . '
AND forum_id = 0';
$db->sql_query($sql);
sync('forum', 'forum_id', $forum_id);
sync('forum', 'forum_id', $to_forum_id);
}
}
else
@@ -403,7 +405,41 @@ function change_topic_type($action, $topic_ids)
}
else
{
confirm_box(false, $l_new_type, $s_hidden_fields);
// Global topic involved?
$global_involved = false;
if ($new_topic_type != POST_GLOBAL)
{
$sql = 'SELECT forum_id
FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . '
AND forum_id = 0';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row)
{
$global_involved = true;
}
}
if ($global_involved)
{
global $template;
$template->assign_vars(array(
'S_FORUM_SELECT' => make_forum_select(request_var('f', $forum_id), false, false, true, true),
'S_CAN_LEAVE_SHADOW' => false,
'ADDITIONAL_MSG' => (sizeof($topic_ids) == 1) ? $user->lang['SELECT_FORUM_GLOBAL_ANNOUNCEMENT'] : $user->lang['SELECT_FORUM_GLOBAL_ANNOUNCEMENTS'])
);
confirm_box(false, $l_new_type, build_hidden_fields($s_hidden_fields), 'mcp_move.html');
}
else
{
confirm_box(false, $l_new_type, build_hidden_fields($s_hidden_fields));
}
}
$redirect = request_var('redirect', "index.$phpEx");
@@ -437,7 +473,7 @@ function mcp_move_topic($topic_ids)
}
$to_forum_id = request_var('to_forum_id', 0);
$redirect = request_var('redirect', $user->data['session_page']);
$redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod')));
$additional_msg = $success_msg = '';
$s_hidden_fields = build_hidden_fields(array(

View File

@@ -145,8 +145,10 @@ function mcp_post_details($id, $mode, $action)
'POST_DATE' => $user->format_date($post_info['post_time']),
'POST_IP' => $post_info['poster_ip'],
'POST_IPADDR' => @gethostbyaddr($post_info['poster_ip']),
'POST_ID' => $post_info['post_id'])
);
'POST_ID' => $post_info['post_id'],
'U_WHOIS' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&action=whois&p=$post_id&ip={$post_info['poster_ip']}") : '',
));
// Get User Notes
$log_data = array();
@@ -274,10 +276,9 @@ function mcp_post_details($id, $mode, $action)
$sql = 'SELECT poster_ip, COUNT(poster_ip) AS postings
FROM ' . POSTS_TABLE . '
WHERE poster_id = ' . $post_info['poster_id'] . '
AND poster_ip <> ' . $db->sql_escape($post_info['poster_ip']) . '
WHERE poster_id = ' . $post_info['poster_id'] . "
GROUP BY poster_ip
ORDER BY postings DESC';
ORDER BY postings DESC";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))

View File

@@ -280,7 +280,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
return;
}
$redirect = request_var('redirect', $user->data['session_page']);
$redirect = request_var('redirect', build_url(array('_f_', 'quickmod')));
$s_hidden_fields = build_hidden_fields(array(
'i' => 'main',
@@ -438,7 +438,7 @@ function merge_posts($topic_id, $to_topic_id)
return;
}
$redirect = request_var('redirect', $user->data['session_page']);
$redirect = request_var('redirect', build_url(array('_f_', 'quickmod')));
$s_hidden_fields = build_hidden_fields(array(
'i' => 'main',

View File

@@ -227,6 +227,14 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
$user->data['user_full_folder'] = PRIVMSGS_INBOX;
}
// Now make sure the folder is not used for rules
// We assign another folder id (the one the messages got moved to) or assign the INBOX (to not have to remove any rule)
$sql = 'UPDATE ' . PRIVMSGS_RULES_TABLE . ' SET rule_folder_id = ';
$sql .= ($remove_action == 1) ? $move_to : PRIVMSGS_INBOX;
$sql .= ' WHERE rule_folder_id = ' . $remove_folder_id;
$db->sql_query($sql);
$meta_info = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;mode=$mode");
$message = $user->lang['FOLDER_REMOVED'];

View File

@@ -65,6 +65,7 @@ class ucp_register
if (!$agreed)
{
$add_lang = ($change_lang) ? '&amp;change_lang=' . urlencode($change_lang) : '';
$add_coppa = ($coppa) ? '&amp;coppa=1' : '';
if ($coppa === false && $config['coppa_enable'])
{
@@ -92,7 +93,7 @@ class ucp_register
'S_SHOW_COPPA' => false,
'S_REGISTRATION' => true,
'S_HIDDEN_FIELDS' => ($confirm_id) ? '<input type="hidden" name="confirm_id" value="' . $confirm_id . '" />' : '',
'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang))
'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang . $add_coppa))
);
}