1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

fixing some bugs

changed the way we are handling bookmarks. No order_id required, really! Order by last post time as suggested by BartVB.


git-svn-id: file:///svn/phpbb/trunk@7497 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-05-07 13:19:59 +00:00
parent 8678ad0b0b
commit 5de26540b4
38 changed files with 359 additions and 419 deletions

View File

@@ -336,6 +336,10 @@ $database_update_info = array(
STYLES_IMAGESET_TABLE => array(
'imgset_nm',
),
BOOKMARKS_TABLE => array(
'order_id',
'topic_user_id',
),
),
'add_index' => array(
SEARCH_WORDLIST_TABLE => array(
@@ -363,7 +367,7 @@ $database_update_info = array(
'username_clean' => array('username_clean'),
),
),
// Add the following columns
// Drop the following columns
'drop_columns' => array(
STYLES_IMAGESET_TABLE => array(
'site_logo',
@@ -461,6 +465,15 @@ $database_update_info = array(
'user_icon9',
'user_icon10'
),
BOOKMARKS_TABLE => array(
'order_id',
),
),
// Adding primary key
'add_primary_keys' => array(
BOOKMARKS_TABLE => array(
'topic_id', 'user_id',
),
),
),
);

View File

@@ -753,7 +753,14 @@ class install_convert extends module
$this->p_master->error(sprintf($user->lang['COULD_NOT_FIND_PATH'], $convert->options['forum_path']), __LINE__, __FILE__);
}
$search_type = $config['search_type'];
$search_type = basename(trim($config['search_type']));
// For conversions we are a bit less strict and set to a search backend we know exist...
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
{
$search_type = 'fulltext_native';
set_config('search_type', $search_type);
}
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
{

View File

@@ -179,12 +179,11 @@ CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes(display_on_posting);
# Table: 'phpbb_bookmarks'
CREATE TABLE phpbb_bookmarks (
topic_id INTEGER DEFAULT 0 NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
order_id INTEGER DEFAULT 0 NOT NULL
user_id INTEGER DEFAULT 0 NOT NULL
);;
CREATE INDEX phpbb_bookmarks_order_id ON phpbb_bookmarks(order_id);;
CREATE INDEX phpbb_bookmarks_topic_user_id ON phpbb_bookmarks(topic_id, user_id);;
ALTER TABLE phpbb_bookmarks ADD PRIMARY KEY (topic_id, user_id);;
# Table: 'phpbb_bots'
CREATE TABLE phpbb_bots (

View File

@@ -236,15 +236,16 @@ GO
*/
CREATE TABLE [phpbb_bookmarks] (
[topic_id] [int] DEFAULT (0) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
[order_id] [int] DEFAULT (0) NOT NULL
[user_id] [int] DEFAULT (0) NOT NULL
) ON [PRIMARY]
GO
CREATE INDEX [order_id] ON [phpbb_bookmarks]([order_id]) ON [PRIMARY]
GO
CREATE INDEX [topic_user_id] ON [phpbb_bookmarks]([topic_id], [user_id]) ON [PRIMARY]
ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_bookmarks] PRIMARY KEY CLUSTERED
(
[topic_id],
[user_id]
) ON [PRIMARY]
GO

View File

@@ -129,9 +129,7 @@ CREATE TABLE phpbb_bbcodes (
CREATE TABLE phpbb_bookmarks (
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
order_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
KEY order_id (order_id),
KEY topic_user_id (topic_id, user_id)
PRIMARY KEY (topic_id, user_id)
);

View File

@@ -129,9 +129,7 @@ CREATE TABLE phpbb_bbcodes (
CREATE TABLE phpbb_bookmarks (
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
order_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
KEY order_id (order_id),
KEY topic_user_id (topic_id, user_id)
PRIMARY KEY (topic_id, user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;

View File

@@ -278,14 +278,10 @@ CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting)
CREATE TABLE phpbb_bookmarks (
topic_id number(8) DEFAULT '0' NOT NULL,
user_id number(8) DEFAULT '0' NOT NULL,
order_id number(8) DEFAULT '0' NOT NULL
CONSTRAINT pk_phpbb_bookmarks PRIMARY KEY (topic_id, user_id)
)
/
CREATE INDEX phpbb_bookmarks_order_id ON phpbb_bookmarks (order_id)
/
CREATE INDEX phpbb_bookmarks_topic_user_id ON phpbb_bookmarks (topic_id, user_id)
/
/*
Table: 'phpbb_bots'

View File

@@ -234,11 +234,9 @@ CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting)
CREATE TABLE phpbb_bookmarks (
topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
order_id INT4 DEFAULT '0' NOT NULL CHECK (order_id >= 0)
PRIMARY KEY (topic_id, user_id)
);
CREATE INDEX phpbb_bookmarks_order_id ON phpbb_bookmarks (order_id);
CREATE INDEX phpbb_bookmarks_topic_user_id ON phpbb_bookmarks (topic_id, user_id);
/*
Table: 'phpbb_bots'

View File

@@ -127,11 +127,9 @@ CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting)
CREATE TABLE phpbb_bookmarks (
topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
order_id INTEGER UNSIGNED NOT NULL DEFAULT '0'
PRIMARY KEY (topic_id, user_id)
);
CREATE INDEX phpbb_bookmarks_order_id ON phpbb_bookmarks (order_id);
CREATE INDEX phpbb_bookmarks_topic_user_id ON phpbb_bookmarks (topic_id, user_id);
# Table: 'phpbb_bots'
CREATE TABLE phpbb_bots (