aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/acp/acp_modules.php19
-rw-r--r--phpBB/install/schemas/mssql_schema.sql34
-rw-r--r--phpBB/install/schemas/oracle_schema.sql14
-rw-r--r--phpBB/install/schemas/postgres_schema.sql34
4 files changed, 56 insertions, 45 deletions
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index 02ca7bbb27..4d1339a111 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -626,10 +626,21 @@ class acp_modules
{
global $db, $user, $auth, $config;
- $sql = 'SELECT module_id, module_enabled, module_name, parent_id, module_langname, left_id, right_id, module_auth
- FROM ' . MODULES_TABLE . "
- WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
- ORDER BY left_id ASC";
+ switch (SQL_LAYER)
+ {
+ case 'firebird':
+ $sql = 'SELECT module_id, module_enabled, "module_name", parent_id, module_langname, left_id, right_id, module_auth
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ ORDER BY left_id ASC";
+ break;
+ default:
+ $sql = 'SELECT module_id, module_enabled, module_name, parent_id, module_langname, left_id, right_id, module_auth
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ ORDER BY left_id ASC";
+ break;
+ }
$result = $db->sql_query($sql);
$right = $iteration = 0;
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index c9f575579d..98584dc68c 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -21,7 +21,7 @@ CREATE TABLE [phpbb_attachments] (
[physical_filename] [varchar] (255) NOT NULL ,
[real_filename] [varchar] (255) NOT NULL ,
[download_count] [int] NOT NULL ,
- [comment] [text] ,
+ [comment] [varchar] (8000) ,
[extension] [varchar] (100) NULL ,
[mimetype] [varchar] (100) NULL ,
[filesize] [int] NOT NULL ,
@@ -128,7 +128,7 @@ GO
CREATE TABLE [phpbb_auth_roles] (
[role_id] [int] IDENTITY (1, 1) NOT NULL ,
[role_name] [varchar] (255) NOT NULL ,
- [role_description] [text] ,
+ [role_description] [varchar] (8000) ,
[role_type] [varchar] (10) NOT NULL ,
[role_order] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
@@ -217,8 +217,8 @@ CREATE TABLE [phpbb_banlist] (
[ban_start] [int] NOT NULL ,
[ban_end] [int] NOT NULL ,
[ban_exclude] [int] NOT NULL ,
- [ban_reason] [text] ,
- [ban_give_reason] [text]
+ [ban_reason] [varchar] (3000) ,
+ [ban_give_reason] [varchar] (3000)
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -305,7 +305,7 @@ GO
CREATE TABLE [phpbb_bots] (
[bot_id] [int] IDENTITY (1, 1) NOT NULL ,
[bot_active] [int] NOT NULL ,
- [bot_name] [text] ,
+ [bot_name] [varchar] (1000) ,
[user_id] [int] NOT NULL ,
[bot_agent] [varchar] (255) NOT NULL ,
[bot_ip] [varchar] (255) NOT NULL
@@ -434,7 +434,7 @@ CREATE TABLE [phpbb_drafts] (
[topic_id] [int] NOT NULL ,
[forum_id] [int] NOT NULL ,
[save_time] [int] NOT NULL ,
- [draft_subject] [text] ,
+ [draft_subject] [varchar] (1000) ,
[draft_message] [text]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -523,7 +523,7 @@ CREATE TABLE [phpbb_forums] (
[left_id] [int] NOT NULL ,
[right_id] [int] NOT NULL ,
[forum_parents] [text] NULL ,
- [forum_name] [text] ,
+ [forum_name] [varchar] (3000) ,
[forum_desc] [text] ,
[forum_desc_bitfield] [int] NOT NULL ,
[forum_desc_uid] [varchar] (5) NOT NULL ,
@@ -787,7 +787,7 @@ CREATE TABLE [phpbb_log] (
[reportee_id] [int] NOT NULL ,
[log_ip] [varchar] (40) NOT NULL ,
[log_time] [int] NOT NULL ,
- [log_operation] [text] ,
+ [log_operation] [varchar] (8000) ,
[log_data] [text]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -902,7 +902,7 @@ GO
CREATE TABLE [phpbb_poll_results] (
[poll_option_id] [int] NOT NULL ,
[topic_id] [int] NOT NULL ,
- [poll_option_text] [text] ,
+ [poll_option_text] [varchar] (3000) ,
[poll_option_total] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -964,7 +964,7 @@ CREATE TABLE [phpbb_posts] (
[enable_magic_url] [int] NOT NULL ,
[enable_sig] [int] NOT NULL ,
[post_username] [varchar] (255) NULL ,
- [post_subject] [text] NOT NULL ,
+ [post_subject] [varchar] (1000) NOT NULL ,
[post_text] [text] NOT NULL ,
[post_checksum] [varchar] (32) NOT NULL ,
[post_encoding] [varchar] (20) NOT NULL ,
@@ -972,7 +972,7 @@ CREATE TABLE [phpbb_posts] (
[bbcode_bitfield] [int] NOT NULL ,
[bbcode_uid] [varchar] (5) NOT NULL ,
[post_edit_time] [int] NULL ,
- [post_edit_reason] [text] NULL,
+ [post_edit_reason] [varchar] (3000) NULL,
[post_edit_user] [int] NULL ,
[post_edit_count] [int] NULL ,
[post_edit_locked] [int] NULL
@@ -1041,9 +1041,9 @@ CREATE TABLE [phpbb_privmsgs] (
[enable_smilies] [int] NOT NULL ,
[enable_magic_url] [int] NOT NULL ,
[enable_sig] [int] NOT NULL ,
- [message_subject] [text] NOT NULL ,
+ [message_subject] [varchar] (1000) NOT NULL ,
[message_text] [text] NOT NULL ,
- [message_edit_reason] [text] NULL ,
+ [message_edit_reason] [varchar] (3000) NULL ,
[message_edit_user] [int] NULL ,
[message_encoding] [varchar] (20) NOT NULL ,
[message_attachment] [int] NOT NULL ,
@@ -1201,7 +1201,7 @@ GO
CREATE TABLE [phpbb_profile_fields] (
[field_id] [int] IDENTITY (1, 1) NOT NULL ,
[field_name] [varchar] (255) NOT NULL ,
- [field_desc] [text] ,
+ [field_desc] [varchar] (8000) ,
[field_type] [int] NOT NULL ,
[field_ident] [varchar] (20) NOT NULL ,
[field_length] [varchar] (20) NOT NULL ,
@@ -1391,7 +1391,7 @@ GO
CREATE TABLE [phpbb_reports_reasons] (
[reason_id] [int] IDENTITY (1, 1) NOT NULL ,
[reason_title] [varchar] (255) NOT NULL ,
- [reason_description] [text] ,
+ [reason_description] [varchar] (8000) ,
[reason_order] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -1925,7 +1925,7 @@ CREATE TABLE [phpbb_topics] (
[topic_attachment] [int] NOT NULL ,
[topic_approved] [int] NOT NULL ,
[topic_reported] [int] NOT NULL ,
- [topic_title] [text] ,
+ [topic_title] [varchar] (1000) ,
[topic_poster] [int] NOT NULL ,
[topic_time] [int] NOT NULL ,
[topic_time_limit] [int] NOT NULL ,
@@ -1944,7 +1944,7 @@ CREATE TABLE [phpbb_topics] (
[topic_moved_id] [int] NOT NULL ,
[topic_bumped] [int] NOT NULL ,
[topic_bumper] [int] NOT NULL ,
- [poll_title] [text] ,
+ [poll_title] [varchar] (3000) ,
[poll_start] [int] NOT NULL ,
[poll_length] [int] NOT NULL ,
[poll_max_options] [int] NOT NULL ,
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 2264bc8bbf..0793f1b8e0 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -215,8 +215,8 @@ CREATE TABLE phpbb_banlist (
ban_start number(11) DEFAULT '0' NOT NULL,
ban_end number(11) DEFAULT '0' NOT NULL,
ban_exclude number(1) DEFAULT '0' NOT NULL,
- ban_reason varchar2(1000),
- ban_give_reason varchar2(1000),
+ ban_reason varchar2(3000),
+ ban_give_reason varchar2(3000),
CONSTRAINT pk_phpbb_banlist PRIMARY KEY (ban_id)
)
/
@@ -476,7 +476,7 @@ CREATE TABLE phpbb_forums (
left_id number(5) NOT NULL,
right_id number(5) NOT NULL,
forum_parents clob,
- forum_name varchar2(1000),
+ forum_name varchar2(3000),
forum_desc clob,
forum_desc_bitfield number(11) DEFAULT '0' NOT NULL,
forum_desc_uid varchar2(5) DEFAULT '' NOT NULL,
@@ -789,7 +789,7 @@ CREATE INDEX phpbb_modules_left_right_id on phpbb_modules (left_id, right_id)
CREATE TABLE phpbb_poll_results (
poll_option_id number(4) DEFAULT '0' NOT NULL,
topic_id number(8) NOT NULL,
- poll_option_text clob,
+ poll_option_text varchar2(3000),
poll_option_total number(8) DEFAULT '0' NOT NULL
)
/
@@ -896,9 +896,9 @@ CREATE TABLE phpbb_privmsgs (
enable_smilies number(1) DEFAULT '1' NOT NULL,
enable_magic_url number(1) DEFAULT '1' NOT NULL,
enable_sig number(1) DEFAULT '1' NOT NULL,
- message_subject varchar2(1000) NOT NULL,
+ message_subject varchar2(3000) NOT NULL,
message_text clob NOT NULL,
- message_edit_reason varchar2(1000) NULL,
+ message_edit_reason varchar2(3000) NULL,
message_edit_user number(8) DEFAULT '0' NULL,
message_encoding varchar2(20) DEFAULT 'iso-8859-1' NOT NULL,
message_attachment number(1) DEFAULT '0' NOT NULL,
@@ -1610,7 +1610,7 @@ CREATE TABLE phpbb_topics (
topic_moved_id number(8) DEFAULT '0' NOT NULL,
topic_bumped number(1) DEFAULT '0' NOT NULL,
topic_bumper number(8) DEFAULT '0' NOT NULL,
- poll_title varchar2(1000),
+ poll_title varchar2(3000),
poll_start number(11) DEFAULT '0' NOT NULL,
poll_length number(11) DEFAULT '0' NOT NULL,
poll_max_options number(4) DEFAULT '1' NOT NULL,
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 08cb5886b4..af0c194d47 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -19,7 +19,7 @@ CREATE TABLE phpbb_attachments (
physical_filename varchar(255) NOT NULL,
real_filename varchar(255) NOT NULL,
download_count INT4 DEFAULT '0' NOT NULL,
- comment TEXT,
+ comment varchar(8000),
extension varchar(100),
mimetype varchar(100),
filesize INT4 NOT NULL,
@@ -81,7 +81,7 @@ CREATE SEQUENCE phpbb_auth_roles_seq;
CREATE TABLE phpbb_auth_roles (
role_id INT4 DEFAULT nextval('phpbb_auth_roles_seq'),
role_name varchar(255) DEFAULT '' NOT NULL,
- role_description TEXT,
+ role_description varchar(8000),
role_type varchar(10) DEFAULT '' NOT NULL,
role_order INT2 DEFAULT '0' NOT NULL,
PRIMARY KEY (role_id)
@@ -126,8 +126,8 @@ CREATE TABLE phpbb_banlist (
ban_start INT4 DEFAULT '0' NOT NULL,
ban_end INT4 DEFAULT '0' NOT NULL,
ban_exclude INT2 DEFAULT '0' NOT NULL,
- ban_reason TEXT,
- ban_give_reason TEXT,
+ ban_reason varchar(3000),
+ ban_give_reason varchar(3000),
PRIMARY KEY (ban_id),
CHECK (ban_userid>=0)
);
@@ -170,7 +170,7 @@ CREATE SEQUENCE phpbb_bots_seq;
CREATE TABLE phpbb_bots (
bot_id INT2 DEFAULT nextval('phpbb_bots_seq'),
bot_active INT2 DEFAULT '1' NOT NULL,
- bot_name TEXT,
+ bot_name varchar(3000),
user_id INT4 DEFAULT '0' NOT NULL,
bot_agent varchar(255) DEFAULT '' NOT NULL,
bot_ip varchar(255) DEFAULT '' NOT NULL,
@@ -235,7 +235,7 @@ CREATE TABLE phpbb_drafts (
topic_id INT4 DEFAULT '0' NOT NULL,
forum_id INT4 DEFAULT '0' NOT NULL,
save_time INT4 DEFAULT '0' NOT NULL,
- draft_subject TEXT,
+ draft_subject varchar(1000),
draft_message TEXT,
PRIMARY KEY (draft_id),
CHECK (user_id>=0),
@@ -464,7 +464,7 @@ CREATE TABLE phpbb_log (
reportee_id INT4 DEFAULT '0' NOT NULL,
log_ip varchar(40) NOT NULL,
log_time INT4 NOT NULL,
- log_operation TEXT,
+ log_operation varchar(8000),
log_data TEXT,
PRIMARY KEY (log_id),
CHECK (log_type>=0),
@@ -525,7 +525,7 @@ CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id);
CREATE TABLE phpbb_poll_results (
poll_option_id INT2 DEFAULT '0' NOT NULL,
topic_id INT4 NOT NULL,
- poll_option_text TEXT,
+ poll_option_text varchar(3000),
poll_option_total INT4 DEFAULT '0' NOT NULL
);
@@ -564,7 +564,7 @@ CREATE TABLE phpbb_posts (
enable_magic_url INT2 DEFAULT '1' NOT NULL,
enable_sig INT2 DEFAULT '1' NOT NULL,
post_username varchar(255) NULL,
- post_subject TEXT NOT NULL,
+ post_subject varchar(1000) NOT NULL,
post_text TEXT NOT NULL,
post_checksum varchar(32) NOT NULL,
post_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
@@ -572,7 +572,7 @@ CREATE TABLE phpbb_posts (
bbcode_bitfield INT4 DEFAULT '0' NOT NULL,
bbcode_uid varchar(5) DEFAULT '' NOT NULL,
post_edit_time INT4 DEFAULT '0' NULL,
- post_edit_reason TEXT NULL,
+ post_edit_reason varchar(3000) NULL,
post_edit_user INT4 DEFAULT '0' NULL,
post_edit_count INT2 DEFAULT '0' NULL,
post_edit_locked INT2 DEFAULT '0' NULL,
@@ -612,9 +612,9 @@ CREATE TABLE phpbb_privmsgs (
enable_smilies INT2 DEFAULT '1' NOT NULL,
enable_magic_url INT2 DEFAULT '1' NOT NULL,
enable_sig INT2 DEFAULT '1' NOT NULL,
- message_subject TEXT NOT NULL,
+ message_subject varchar(1000) NOT NULL,
message_text TEXT NOT NULL,
- message_edit_reason TEXT NULL,
+ message_edit_reason varchar(3000) NULL,
message_edit_user INT4 DEFAULT '0' NULL,
message_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
message_attachment INT2 DEFAULT '0' NOT NULL,
@@ -710,7 +710,7 @@ CREATE SEQUENCE phpbb_profile_fields_seq;
CREATE TABLE phpbb_profile_fields (
field_id INT4 DEFAULT nextval('phpbb_profile_fields_seq'),
field_name varchar(255) DEFAULT '' NOT NULL,
- field_desc TEXT,
+ field_desc varchar(8000),
field_type INT4 NOT NULL,
field_ident varchar(20) DEFAULT '' NOT NULL,
field_length varchar(20) DEFAULT '' NOT NULL,
@@ -768,7 +768,7 @@ CREATE TABLE phpbb_profile_lang (
field_id INT4 DEFAULT '0' NOT NULL,
lang_id INT2 DEFAULT '0' NOT NULL,
lang_name varchar(255) DEFAULT '' NOT NULL,
- lang_explain TEXT,
+ lang_explain varchar(8000),
lang_default_value varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (field_id,lang_id),
CHECK (field_id>=0),
@@ -821,7 +821,7 @@ CREATE SEQUENCE phpbb_reports_reasons_seq;
CREATE TABLE phpbb_reports_reasons (
reason_id INT2 DEFAULT nextval('phpbb_reports_reasons_seq'),
reason_title varchar(255) DEFAULT '' NOT NULL,
- reason_description TEXT,
+ reason_description varchar(8000),
reason_order INT2 DEFAULT '0' NOT NULL,
PRIMARY KEY (reason_id)
);
@@ -1106,7 +1106,7 @@ CREATE TABLE phpbb_topics (
topic_attachment INT2 DEFAULT '0' NOT NULL,
topic_approved INT2 DEFAULT '1' NOT NULL,
topic_reported INT2 DEFAULT '0' NOT NULL,
- topic_title TEXT,
+ topic_title varchar(1000),
topic_poster INT4 DEFAULT '0' NOT NULL,
topic_time INT4 DEFAULT '0' NOT NULL,
topic_time_limit INT4 DEFAULT '0' NOT NULL,
@@ -1125,7 +1125,7 @@ CREATE TABLE phpbb_topics (
topic_moved_id INT4 DEFAULT '0' NOT NULL,
topic_bumped INT2 DEFAULT '0' NOT NULL,
topic_bumper INT4 DEFAULT '0' NOT NULL,
- poll_title TEXT,
+ poll_title varchar(3000),
poll_start INT4 DEFAULT '0' NOT NULL,
poll_length INT4 DEFAULT '0' NOT NULL,
poll_max_options INT2 DEFAULT '1' NOT NULL,