mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
- fixed notification redirection
- added SID to ucp redirects git-svn-id: file:///svn/phpbb/trunk@4915 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6aa372226e
commit
8022b6f6b2
5 changed files with 15 additions and 12 deletions
|
@ -977,9 +977,10 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = FALSE,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT DISTINCT(post_id)
|
$sql = 'SELECT DISTINCT(post_msg_id)
|
||||||
FROM ' . ATTACHMENTS_TABLE . '
|
FROM ' . ATTACHMENTS_TABLE . '
|
||||||
WHERE post_id IN (' . implode(', ', $post_ids) . ')';
|
WHERE post_msg_id IN (' . implode(', ', $post_ids) . ')
|
||||||
|
AND in_message = 0';
|
||||||
|
|
||||||
$post_ids = array();
|
$post_ids = array();
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
|
@ -163,6 +163,8 @@ class ucp_main extends module
|
||||||
|
|
||||||
if ($post_count_sql)
|
if ($post_count_sql)
|
||||||
{
|
{
|
||||||
|
// NOTE: The following three queries could be a problem for big boards
|
||||||
|
|
||||||
// Grab all the relevant data
|
// Grab all the relevant data
|
||||||
$sql = 'SELECT COUNT(p.post_id) AS num_posts
|
$sql = 'SELECT COUNT(p.post_id) AS num_posts
|
||||||
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
|
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
|
||||||
|
|
|
@ -98,6 +98,7 @@ CREATE TABLE phpbb_bbcodes (
|
||||||
PRIMARY KEY (bbcode_id)
|
PRIMARY KEY (bbcode_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# Table: 'phpbb_bookmarks'
|
||||||
CREATE TABLE phpbb_bookmarks (
|
CREATE TABLE phpbb_bookmarks (
|
||||||
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
@ -755,9 +756,6 @@ CREATE TABLE phpbb_styles_imageset (
|
||||||
poll_center varchar(200) DEFAULT '' NOT NULL,
|
poll_center varchar(200) DEFAULT '' NOT NULL,
|
||||||
poll_right varchar(200) DEFAULT '' NOT NULL,
|
poll_right varchar(200) DEFAULT '' NOT NULL,
|
||||||
attach_progress_bar varchar(200) DEFAULT '' NOT NULL,
|
attach_progress_bar varchar(200) DEFAULT '' NOT NULL,
|
||||||
karma_left varchar(200) DEFAULT '' NOT NULL,
|
|
||||||
karma_center varchar(200) DEFAULT '' NOT NULL,
|
|
||||||
karma_right varchar(200) DEFAULT '' NOT NULL,
|
|
||||||
user_icon1 varchar(200) DEFAULT '' NOT NULL,
|
user_icon1 varchar(200) DEFAULT '' NOT NULL,
|
||||||
user_icon2 varchar(200) DEFAULT '' NOT NULL,
|
user_icon2 varchar(200) DEFAULT '' NOT NULL,
|
||||||
user_icon3 varchar(200) DEFAULT '' NOT NULL,
|
user_icon3 varchar(200) DEFAULT '' NOT NULL,
|
||||||
|
|
|
@ -321,16 +321,16 @@ switch ($mode)
|
||||||
// We destroy the session here, the user will be logged out nevertheless
|
// We destroy the session here, the user will be logged out nevertheless
|
||||||
$user->destroy();
|
$user->destroy();
|
||||||
|
|
||||||
meta_refresh(3, "{$phpbb_root_path}index.$phpEx");
|
meta_refresh(3, "{$phpbb_root_path}index.$phpEx$SID");
|
||||||
|
|
||||||
$message = $user->lang['COOKIES_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], "<a href=\"{$phpbb_root_path}index.$phpEx\">", '</a>');
|
$message = $user->lang['COOKIES_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], "<a href=\"{$phpbb_root_path}index.$phpEx$SID\">", '</a>');
|
||||||
trigger_error($message);
|
trigger_error($message);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
confirm_box(false, 'DELETE_COOKIES', '');
|
confirm_box(false, 'DELETE_COOKIES', '');
|
||||||
}
|
}
|
||||||
redirect("index.$phpEx");
|
redirect("index.$phpEx$SID");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ if ($user->data['user_id'] == ANONYMOUS || $user->data['user_type'] == USER_INAC
|
||||||
{
|
{
|
||||||
if ($user->data['user_id'] != ANONYMOUS)
|
if ($user->data['user_id'] != ANONYMOUS)
|
||||||
{
|
{
|
||||||
redirect("index.$phpEx");
|
redirect("index.$phpEx$SID");
|
||||||
}
|
}
|
||||||
|
|
||||||
login_box($user->cur_page, '', $user->lang['LOGIN_EXPLAIN_UCP']);
|
login_box($user->cur_page, '', $user->lang['LOGIN_EXPLAIN_UCP']);
|
||||||
|
|
|
@ -268,15 +268,17 @@ if ($forum_password)
|
||||||
if (isset($_GET['e']))
|
if (isset($_GET['e']))
|
||||||
{
|
{
|
||||||
$jump_to = (int) $_GET['e'];
|
$jump_to = (int) $_GET['e'];
|
||||||
$redirect_url = htmlspecialchars(str_replace('&e=' . $jump_to, '', $_SERVER['REQUEST_URI'])) . (($jump_to) ? '#' . $jump_to : '');
|
|
||||||
|
$redirect_url = str_replace('&e=' . $jump_to, '', $_SERVER['REQUEST_URI']) . (($jump_to) ? '#' . $jump_to : '');
|
||||||
|
|
||||||
if ($user->data['user_id'] == ANONYMOUS)
|
if ($user->data['user_id'] == ANONYMOUS)
|
||||||
{
|
{
|
||||||
login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', $redirect_url), '', $user->lang['LOGIN_NOTIFY_TOPIC']);
|
login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($redirect_url)), '', $user->lang['LOGIN_NOTIFY_TOPIC']);
|
||||||
}
|
}
|
||||||
else if ($jump_to > 0)
|
else if ($jump_to > 0)
|
||||||
{
|
{
|
||||||
// We direct the already logged in user to the correct post...
|
// We direct the already logged in user to the correct post...
|
||||||
redirect($redirect_url);
|
redirect(preg_replace('#^' . $config['script_path'] . '#', '', $redirect_url));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue