diff options
author | David M <davidmj@users.sourceforge.net> | 2006-04-18 21:06:00 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2006-04-18 21:06:00 +0000 |
commit | a8e11e22649ccef938d36826212855989c4a6ff3 (patch) | |
tree | c4273afdee54b3c596833b6781adcd75cce62351 /phpBB | |
parent | fcd3d18fb31d25d38211c16dcd781a6c19e616bc (diff) | |
download | forums-a8e11e22649ccef938d36826212855989c4a6ff3.tar forums-a8e11e22649ccef938d36826212855989c4a6ff3.tar.gz forums-a8e11e22649ccef938d36826212855989c4a6ff3.tar.bz2 forums-a8e11e22649ccef938d36826212855989c4a6ff3.tar.xz forums-a8e11e22649ccef938d36826212855989c4a6ff3.zip |
- Forgot to remove a lang string
- Firebird!
- Fixes for mssql and mssql-odbc
git-svn-id: file:///svn/phpbb/trunk@5800 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/db/firebird.php | 2 | ||||
-rw-r--r-- | phpBB/includes/db/mssql.php | 5 | ||||
-rw-r--r-- | phpBB/includes/db/mssql_odbc.php | 2 | ||||
-rw-r--r-- | phpBB/install/install.php | 8 | ||||
-rwxr-xr-x | phpBB/install/install_install.php | 8 | ||||
-rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 50 | ||||
-rw-r--r-- | phpBB/language/en/acp/database.php | 1 |
7 files changed, 43 insertions, 33 deletions
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php index 21e8052a9a..b78d9afefe 100644 --- a/phpBB/includes/db/firebird.php +++ b/phpBB/includes/db/firebird.php @@ -90,6 +90,8 @@ class dbal_firebird extends dbal { global $cache; + $query = preg_replace('#FROM \(([^)]*)\)(,|[\n\r\t ]+(?:WHERE|LEFT JOIN)) #', 'FROM \1\2 ', $query); + $this->last_query_text = $query; $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index cd11b683a3..3a750a2847 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -272,11 +272,10 @@ class dbal_mssql extends dbal $result_id = @mssql_query('SELECT @@IDENTITY', $this->db_connect_id); if ($result_id) { - if (@mssql_fetch_assoc($result_id)) + if ($row = @mssql_fetch_assoc($result_id)) { - $id = @mssql_result($result_id, 1); @mssql_free_result($result_id); - return $id; + return $row['computed']; } @mssql_free_result($result_id); } diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php index 362083f2d9..bfefa04bf1 100644 --- a/phpBB/includes/db/mssql_odbc.php +++ b/phpBB/includes/db/mssql_odbc.php @@ -100,6 +100,8 @@ class dbal_mssql_odbc extends dbal { $this->sql_report('start', $query); } + + $query = preg_replace('#FROM \(([^)]*)\)(,|[\n\r\t ]+(?:WHERE|LEFT JOIN)) #', 'FROM \1\2 ', $query); $this->last_query_text = $query; $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; diff --git a/phpBB/install/install.php b/phpBB/install/install.php index bf8651f62f..5c5619b066 100644 --- a/phpBB/install/install.php +++ b/phpBB/install/install.php @@ -1111,11 +1111,15 @@ if ($stage == 3) case 'mssql': case 'mssql_odbc': $sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', 'SET IDENTITY_INSERT \1 \2', $sql_query); - break; + break; case 'postgres': $sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query); - break; + break; + + case 'firebird': + $sql_query = str_replace('module_name', '"module_name"', $sql_query); + break; default: //$sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', '', $sql_query); diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 34bb4e9c8a..4d7a032137 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -887,11 +887,15 @@ class install_install extends module case 'mssql': case 'mssql_odbc': $sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', 'SET IDENTITY_INSERT \1 \2', $sql_query); - break; + break; case 'postgres': $sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query); - break; + break; + + case 'firebird': + $sql_query = str_replace('module_name', '"module_name"', $sql_query); + break; default: //$sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', '', $sql_query); diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index aa38dfc853..e13386eb25 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -49,7 +49,7 @@ CREATE TABLE phpbb_auth_groups ( auth_setting INTEGER DEFAULT 0 NOT NULL );; -CREATE INDEX phpbb_auth_groups_auth_option_id ON phpbb_auth_groups(auth_option_id);; +CREATE INDEX phpbb_auth_groups_auth_opt_id ON phpbb_auth_groups(auth_option_id);; CREATE INDEX phpbb_auth_groups_group_id ON phpbb_auth_groups(group_id);; @@ -122,7 +122,7 @@ CREATE TABLE phpbb_auth_users ( auth_setting INTEGER DEFAULT 0 NOT NULL );; -CREATE INDEX phpbb_auth_users_auth_option_id ON phpbb_auth_users(auth_option_id);; +CREATE INDEX phpbb_auth_users_auth_opt_id ON phpbb_auth_users(auth_option_id);; CREATE INDEX phpbb_auth_users_user_id ON phpbb_auth_users(user_id);; @@ -166,7 +166,7 @@ CREATE TABLE phpbb_bbcodes ( ALTER TABLE phpbb_bbcodes ADD PRIMARY KEY (bbcode_id);; -CREATE INDEX phpbb_bbcodes_display_on_posting ON phpbb_bbcodes(display_on_posting);; +CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes(display_on_posting);; # phpbb_bookmarks @@ -207,7 +207,7 @@ END;; # phpbb_cache CREATE TABLE phpbb_cache ( - var_name VARCHAR(255) NOT NULL, + var_name VARCHAR(252) NOT NULL, var_expires INTEGER DEFAULT 0 NOT NULL, var_data BLOB SUB_TYPE TEXT );; @@ -371,7 +371,7 @@ CREATE TABLE phpbb_forums ( ALTER TABLE phpbb_forums ADD PRIMARY KEY (forum_id);; -CREATE INDEX phpbb_forums_forum_last_post_id ON phpbb_forums(forum_last_post_id);; +CREATE INDEX phpbb_forums_forum_lst_post_id ON phpbb_forums(forum_last_post_id);; CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums(left_id, right_id);; CREATE GENERATOR phpbb_forums_gen;; @@ -413,7 +413,7 @@ CREATE TABLE phpbb_forums_watch ( );; CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch(forum_id);; -CREATE INDEX phpbb_forums_watch_notify_status ON phpbb_forums_watch(notify_status);; +CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch(notify_status);; CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch(user_id);; @@ -543,7 +543,7 @@ CREATE TABLE phpbb_moderator_cache ( display_on_index INTEGER DEFAULT 1 NOT NULL );; -CREATE INDEX phpbb_moderator_cache_display_on_index ON phpbb_moderator_cache(display_on_index);; +CREATE INDEX phpbb_moderator_cche_dis_on_idx ON phpbb_moderator_cache(display_on_index);; CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache(forum_id);; @@ -552,7 +552,7 @@ CREATE TABLE phpbb_modules ( module_id INTEGER NOT NULL, module_enabled INTEGER DEFAULT 1 NOT NULL, module_display INTEGER DEFAULT 1 NOT NULL, - module_name VARCHAR(255) NOT NULL, + "module_name" VARCHAR(255) NOT NULL, module_class VARCHAR(10) NOT NULL, parent_id INTEGER NOT NULL, left_id INTEGER NOT NULL, @@ -586,7 +586,7 @@ CREATE TABLE phpbb_poll_results ( poll_option_total INTEGER DEFAULT 0 NOT NULL );; -CREATE INDEX phpbb_poll_results_poll_option_id ON phpbb_poll_results(poll_option_id);; +CREATE INDEX phpbb_poll_results_poll_opt_id ON phpbb_poll_results(poll_option_id);; CREATE INDEX phpbb_poll_results_topic_id ON phpbb_poll_results(topic_id);; @@ -786,7 +786,7 @@ CREATE TABLE phpbb_profile_fields ( ALTER TABLE phpbb_profile_fields ADD PRIMARY KEY (field_id);; -CREATE INDEX phpbb_profile_fields_field_order ON phpbb_profile_fields(field_order);; +CREATE INDEX phpbb_profile_fields_field_ord ON phpbb_profile_fields(field_order);; CREATE INDEX phpbb_profile_fields_field_type ON phpbb_profile_fields(field_type);; CREATE GENERATOR phpbb_profile_fields_gen;; @@ -814,7 +814,7 @@ CREATE TABLE phpbb_profile_fields_lang ( lang_id INTEGER DEFAULT 0 NOT NULL, option_id INTEGER DEFAULT 0 NOT NULL, field_type INTEGER DEFAULT 0 NOT NULL, - value VARCHAR(255) NOT NULL + "value" VARCHAR(255) NOT NULL );; ALTER TABLE phpbb_profile_fields_lang ADD PRIMARY KEY (field_id, lang_id, option_id);; @@ -1025,7 +1025,7 @@ END;; # phpbb_styles CREATE TABLE phpbb_styles ( style_id INTEGER NOT NULL, - style_name VARCHAR(255) NOT NULL, + style_name VARCHAR(252) NOT NULL, style_copyright VARCHAR(255) NOT NULL, style_active INTEGER DEFAULT 1 NOT NULL, template_id INTEGER DEFAULT 0 NOT NULL, @@ -1054,7 +1054,7 @@ END;; # phpbb_styles_imageset CREATE TABLE phpbb_styles_imageset ( imageset_id INTEGER NOT NULL, - imageset_name VARCHAR(255) NOT NULL, + imageset_name VARCHAR(252) NOT NULL, imageset_copyright VARCHAR(255) NOT NULL, imageset_path VARCHAR(100) NOT NULL, site_logo VARCHAR(200) NOT NULL, @@ -1138,7 +1138,7 @@ CREATE TABLE phpbb_styles_imageset ( ALTER TABLE phpbb_styles_imageset ADD PRIMARY KEY (imageset_id);; -CREATE UNIQUE INDEX phpbb_styles_imageset_imageset_name ON phpbb_styles_imageset(imageset_name);; +CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset(imageset_name);; CREATE GENERATOR phpbb_styles_imageset_gen;; SET GENERATOR phpbb_styles_imageset_gen TO 0;; @@ -1154,7 +1154,7 @@ END;; # phpbb_styles_template CREATE TABLE phpbb_styles_template ( template_id INTEGER NOT NULL, - template_name VARCHAR(255) NOT NULL, + template_name VARCHAR(252) NOT NULL, template_copyright VARCHAR(255) NOT NULL, template_path VARCHAR(100) NOT NULL, bbcode_bitfield INTEGER DEFAULT 0 NOT NULL, @@ -1163,7 +1163,7 @@ CREATE TABLE phpbb_styles_template ( ALTER TABLE phpbb_styles_template ADD PRIMARY KEY (template_id);; -CREATE UNIQUE INDEX phpbb_styles_template_template_name ON phpbb_styles_template(template_name);; +CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template(template_name);; # phpbb_styles_template_data @@ -1175,13 +1175,13 @@ CREATE TABLE phpbb_styles_template_data ( template_data BLOB SUB_TYPE TEXT );; -CREATE INDEX phpbb_styles_template_data_template_filename ON phpbb_styles_template_data(template_filename);; -CREATE INDEX phpbb_styles_template_data_template_id ON phpbb_styles_template_data(template_id);; +CREATE INDEX phpbb_styles_tmplte_d_tmpl_flnm ON phpbb_styles_template_data(template_filename);; +CREATE INDEX phpbb_styles_tmplte_dt_tmplt_id ON phpbb_styles_template_data(template_id);; CREATE GENERATOR phpbb_styles_template_data_gen;; SET GENERATOR phpbb_styles_template_data_gen TO 0;; -CREATE TRIGGER t_phpbb_styles_template_data_gen FOR phpbb_styles_template +CREATE TRIGGER t_phpbb_styles_templte_data_gen FOR phpbb_styles_template BEFORE INSERT AS BEGIN @@ -1192,7 +1192,7 @@ END;; # phpbb_styles_theme CREATE TABLE phpbb_styles_theme ( theme_id INTEGER NOT NULL, - theme_name VARCHAR(255) NOT NULL, + theme_name VARCHAR(252) NOT NULL, theme_copyright VARCHAR(255) NOT NULL, theme_path VARCHAR(100) NOT NULL, theme_storedb INTEGER DEFAULT 0 NOT NULL, @@ -1254,7 +1254,7 @@ ALTER TABLE phpbb_topics ADD PRIMARY KEY (topic_id);; CREATE INDEX phpbb_topics_forum_id ON phpbb_topics(forum_id);; CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics(forum_id, topic_type);; -CREATE INDEX phpbb_topics_topic_last_post_time ON phpbb_topics(topic_last_post_time);; +CREATE INDEX phpbb_topics_topic_last_pst_tme ON phpbb_topics(topic_last_post_time);; CREATE GENERATOR phpbb_topics_gen;; SET GENERATOR phpbb_topics_gen TO 0;; @@ -1297,7 +1297,7 @@ CREATE TABLE phpbb_topics_watch ( notify_status INTEGER DEFAULT 0 NOT NULL );; -CREATE INDEX phpbb_topics_watch_notify_status ON phpbb_topics_watch(notify_status);; +CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch(notify_status);; CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch(topic_id);; CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch(user_id);; @@ -1324,7 +1324,7 @@ CREATE TABLE phpbb_users ( user_perm_from INTEGER DEFAULT 0 NOT NULL, user_ip VARCHAR(40) NOT NULL, user_regdate INTEGER DEFAULT 0 NOT NULL, - username VARCHAR(255) NOT NULL, + username VARCHAR(252) NOT NULL, user_password VARCHAR(40) NOT NULL, user_passchg INTEGER DEFAULT 0 NOT NULL, user_email VARCHAR(100) NOT NULL, @@ -1409,8 +1409,8 @@ CREATE TABLE phpbb_warnings ( warning_id INTEGER NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, post_id INTEGER DEFAULT 0 NOT NULL, - log_id INTEGER DEFAULT 0 NOT NULLL, - warning_time INTEGER DEFAULT 0 NOT NULL, + log_id INTEGER DEFAULT 0 NOT NULL, + warning_time INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_warnings ADD PRIMARY KEY (warning_id);; diff --git a/phpBB/language/en/acp/database.php b/phpBB/language/en/acp/database.php index 1db01ed7a4..bc212c20e2 100644 --- a/phpBB/language/en/acp/database.php +++ b/phpBB/language/en/acp/database.php @@ -54,7 +54,6 @@ $lang = array_merge($lang, array( 'DELETE_BACKUP' => 'Delete Backup', 'DOWNLOAD_BACKUP' => 'Download Backup', 'RESTORE_SUCCESS' => 'The Database has been successfully restored.<br /><br />Your board should be back to the state it was when the backup was made.', - 'BACKUP_SUCCESS' => 'The backup has been successfully deleted.', )); ?>
\ No newline at end of file |