mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-18 08:01:10 +02:00
fix r9713 for #36565
Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9931 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@ -1305,6 +1305,7 @@ function get_schema_struct()
|
||||
'poster_ip' => array('INDEX', 'poster_ip'),
|
||||
'poster_id' => array('INDEX', 'poster_id'),
|
||||
'post_approved' => array('INDEX', 'post_approved'),
|
||||
'post_username' => array('INDEX', 'post_username'),
|
||||
'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
|
||||
),
|
||||
);
|
||||
|
@ -444,8 +444,7 @@ class fulltext_mysql extends search_backend
|
||||
if (sizeof($author_ary) && $author_name)
|
||||
{
|
||||
// first one matches post of registered users, second one guests and deleted users
|
||||
$sql_author = ' AND (' . $db->sql_in_set('p.poster_id', $author_ary) . " AND p.post_username = ''";
|
||||
$sql_author .= ' OR p.poster_id = ' . ANONYMOUS . ' AND p.post_username ' . $author_name . ')';
|
||||
$sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
|
||||
}
|
||||
else if (sizeof($author_ary))
|
||||
{
|
||||
@ -553,8 +552,7 @@ class fulltext_mysql extends search_backend
|
||||
if ($author_name)
|
||||
{
|
||||
// first one matches post of registered users, second one guests and deleted users
|
||||
$sql_author = '(' . $db->sql_in_set('p.poster_id', $author_ary) . " AND p.post_username = ''";
|
||||
$sql_author .= ' OR p.poster_id = ' . ANONYMOUS . ' AND p.post_username ' . $author_name . ')';
|
||||
$sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -628,8 +628,7 @@ class fulltext_native extends search_backend
|
||||
if ($author_name)
|
||||
{
|
||||
// first one matches post of registered users, second one guests and deleted users
|
||||
$sql_author = '(' . $db->sql_in_set('p.poster_id', $author_ary) . " AND p.post_username = ''";
|
||||
$sql_author .= ' OR p.poster_id = ' . ANONYMOUS . ' AND p.post_username ' . $author_name . ')';
|
||||
$sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -840,8 +839,7 @@ class fulltext_native extends search_backend
|
||||
if ($author_name)
|
||||
{
|
||||
// first one matches post of registered users, second one guests and deleted users
|
||||
$sql_author = '(' . $db->sql_in_set('p.poster_id', $author_ary) . " AND p.post_username = ''";
|
||||
$sql_author .= ' OR p.poster_id = ' . ANONYMOUS . ' AND p.post_username ' . $author_name . ')';
|
||||
$sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -721,6 +721,9 @@ function database_update_info()
|
||||
'post_id' => array('post_id'),
|
||||
'pm_id' => array('pm_id'),
|
||||
),
|
||||
POSTS_TABLE => array(
|
||||
'post_username' => array('post_username'),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -650,6 +650,7 @@ CREATE INDEX phpbb_posts_topic_id ON phpbb_posts(topic_id);;
|
||||
CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts(poster_ip);;
|
||||
CREATE INDEX phpbb_posts_poster_id ON phpbb_posts(poster_id);;
|
||||
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts(post_approved);;
|
||||
CREATE INDEX phpbb_posts_post_username ON phpbb_posts(post_username);;
|
||||
CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts(topic_id, post_time);;
|
||||
|
||||
CREATE GENERATOR phpbb_posts_gen;;
|
||||
|
@ -803,6 +803,9 @@ GO
|
||||
CREATE INDEX [post_approved] ON [phpbb_posts]([post_approved]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [post_username] ON [phpbb_posts]([post_username]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [tid_post_time] ON [phpbb_posts]([topic_id], [post_time]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
@ -459,6 +459,7 @@ CREATE TABLE phpbb_posts (
|
||||
KEY poster_ip (poster_ip),
|
||||
KEY poster_id (poster_id),
|
||||
KEY post_approved (post_approved),
|
||||
KEY post_username (post_username(255)),
|
||||
KEY tid_post_time (topic_id, post_time)
|
||||
);
|
||||
|
||||
|
@ -459,6 +459,7 @@ CREATE TABLE phpbb_posts (
|
||||
KEY poster_ip (poster_ip),
|
||||
KEY poster_id (poster_id),
|
||||
KEY post_approved (post_approved),
|
||||
KEY post_username (post_username),
|
||||
KEY tid_post_time (topic_id, post_time)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
||||
|
@ -879,6 +879,8 @@ CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id)
|
||||
/
|
||||
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved)
|
||||
/
|
||||
CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username)
|
||||
/
|
||||
CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time)
|
||||
/
|
||||
|
||||
|
@ -630,6 +630,7 @@ CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);
|
||||
CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);
|
||||
CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
|
||||
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);
|
||||
CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username);
|
||||
CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time);
|
||||
|
||||
/*
|
||||
|
@ -447,6 +447,7 @@ CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);
|
||||
CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);
|
||||
CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
|
||||
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);
|
||||
CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username);
|
||||
CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time);
|
||||
|
||||
# Table: 'phpbb_privmsgs'
|
||||
|
Reference in New Issue
Block a user