|
From: Joas S. <nic...@ph...> - 2009-08-05 15:29:32
|
Author: nickvergessen
Date: Wed Aug 5 16:28:46 2009
New Revision: 9931
Log:
fix r9713 for #36565
Authorised by: AcydBurn
Modified:
branches/phpBB-3_0_0/phpBB/develop/create_schema_files.php
branches/phpBB-3_0_0/phpBB/includes/search/fulltext_mysql.php
branches/phpBB-3_0_0/phpBB/includes/search/fulltext_native.php
branches/phpBB-3_0_0/phpBB/install/database_update.php
branches/phpBB-3_0_0/phpBB/install/schemas/firebird_schema.sql
branches/phpBB-3_0_0/phpBB/install/schemas/mssql_schema.sql
branches/phpBB-3_0_0/phpBB/install/schemas/mysql_40_schema.sql
branches/phpBB-3_0_0/phpBB/install/schemas/mysql_41_schema.sql
branches/phpBB-3_0_0/phpBB/install/schemas/oracle_schema.sql
branches/phpBB-3_0_0/phpBB/install/schemas/postgres_schema.sql
branches/phpBB-3_0_0/phpBB/install/schemas/sqlite_schema.sql
Modified: branches/phpBB-3_0_0/phpBB/develop/create_schema_files.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/develop/create_schema_files.php (original)
--- branches/phpBB-3_0_0/phpBB/develop/create_schema_files.php Wed Aug 5 16:28:46 2009
***************
*** 1305,1310 ****
--- 1305,1311 ----
'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')),
),
);
Modified: branches/phpBB-3_0_0/phpBB/includes/search/fulltext_mysql.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/search/fulltext_mysql.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/search/fulltext_mysql.php Wed Aug 5 16:28:46 2009
***************
*** 444,451 ****
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 . ')';
}
else if (sizeof($author_ary))
{
--- 444,450 ----
if (sizeof($author_ary) && $author_name)
{
// first one matches post of registered users, second one guests and deleted users
! $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,560 ****
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 . ')';
}
else
{
--- 552,558 ----
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', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
}
else
{
Modified: branches/phpBB-3_0_0/phpBB/includes/search/fulltext_native.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/search/fulltext_native.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/search/fulltext_native.php Wed Aug 5 16:28:46 2009
***************
*** 628,635 ****
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 . ')';
}
else
{
--- 628,634 ----
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', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
}
else
{
***************
*** 840,847 ****
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 . ')';
}
else
{
--- 839,845 ----
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', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
}
else
{
Modified: branches/phpBB-3_0_0/phpBB/install/database_update.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/install/database_update.php (original)
--- branches/phpBB-3_0_0/phpBB/install/database_update.php Wed Aug 5 16:28:46 2009
***************
*** 721,726 ****
--- 721,729 ----
'post_id' => array('post_id'),
'pm_id' => array('pm_id'),
),
+ POSTS_TABLE => array(
+ 'post_username' => array('post_username'),
+ ),
),
),
);
Modified: branches/phpBB-3_0_0/phpBB/install/schemas/firebird_schema.sql
==============================================================================
*** branches/phpBB-3_0_0/phpBB/install/schemas/firebird_schema.sql (original)
--- branches/phpBB-3_0_0/phpBB/install/schemas/firebird_schema.sql Wed Aug 5 16:28:46 2009
***************
*** 650,655 ****
--- 650,656 ----
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;;
Modified: branches/phpBB-3_0_0/phpBB/install/schemas/mssql_schema.sql
==============================================================================
*** branches/phpBB-3_0_0/phpBB/install/schemas/mssql_schema.sql (original)
--- branches/phpBB-3_0_0/phpBB/install/schemas/mssql_schema.sql Wed Aug 5 16:28:46 2009
***************
*** 803,808 ****
--- 803,811 ----
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
Modified: branches/phpBB-3_0_0/phpBB/install/schemas/mysql_40_schema.sql
==============================================================================
*** branches/phpBB-3_0_0/phpBB/install/schemas/mysql_40_schema.sql (original)
--- branches/phpBB-3_0_0/phpBB/install/schemas/mysql_40_schema.sql Wed Aug 5 16:28:46 2009
***************
*** 459,464 ****
--- 459,465 ----
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)
);
Modified: branches/phpBB-3_0_0/phpBB/install/schemas/mysql_41_schema.sql
==============================================================================
*** branches/phpBB-3_0_0/phpBB/install/schemas/mysql_41_schema.sql (original)
--- branches/phpBB-3_0_0/phpBB/install/schemas/mysql_41_schema.sql Wed Aug 5 16:28:46 2009
***************
*** 459,464 ****
--- 459,465 ----
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`;
Modified: branches/phpBB-3_0_0/phpBB/install/schemas/oracle_schema.sql
==============================================================================
*** branches/phpBB-3_0_0/phpBB/install/schemas/oracle_schema.sql (original)
--- branches/phpBB-3_0_0/phpBB/install/schemas/oracle_schema.sql Wed Aug 5 16:28:46 2009
***************
*** 879,884 ****
--- 879,886 ----
/
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)
/
Modified: branches/phpBB-3_0_0/phpBB/install/schemas/postgres_schema.sql
==============================================================================
*** branches/phpBB-3_0_0/phpBB/install/schemas/postgres_schema.sql (original)
--- branches/phpBB-3_0_0/phpBB/install/schemas/postgres_schema.sql Wed Aug 5 16:28:46 2009
***************
*** 630,635 ****
--- 630,636 ----
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);
/*
Modified: branches/phpBB-3_0_0/phpBB/install/schemas/sqlite_schema.sql
==============================================================================
*** branches/phpBB-3_0_0/phpBB/install/schemas/sqlite_schema.sql (original)
--- branches/phpBB-3_0_0/phpBB/install/schemas/sqlite_schema.sql Wed Aug 5 16:28:46 2009
***************
*** 447,452 ****
--- 447,453 ----
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'
|