diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 1261d4f57e..7f8b091324 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -1028,7 +1028,7 @@ function get_schema_struct()
'forum_desc_uid' => array('VCHAR:5', ''),
'forum_link' => array('VCHAR_UNI', ''),
'forum_password' => array('VCHAR_UNI:40', ''),
- 'forum_style' => array('TINT:4', 0),
+ 'forum_style' => array('USINT', 0),
'forum_image' => array('VCHAR', ''),
'forum_rules' => array('TEXT_UNI', ''),
'forum_rules_link' => array('VCHAR_UNI', ''),
@@ -1556,13 +1556,13 @@ function get_schema_struct()
$schema_data['phpbb_styles'] = array(
'COLUMNS' => array(
- 'style_id' => array('TINT:4', NULL, 'auto_increment'),
+ 'style_id' => array('USINT', NULL, 'auto_increment'),
'style_name' => array('VCHAR_UNI:255', ''),
'style_copyright' => array('VCHAR_UNI', ''),
'style_active' => array('BOOL', 1),
- 'template_id' => array('TINT:4', 0),
- 'theme_id' => array('TINT:4', 0),
- 'imageset_id' => array('TINT:4', 0),
+ 'template_id' => array('USINT', 0),
+ 'theme_id' => array('USINT', 0),
+ 'imageset_id' => array('USINT', 0),
),
'PRIMARY_KEY' => 'style_id',
'KEYS' => array(
@@ -1575,7 +1575,7 @@ function get_schema_struct()
$schema_data['phpbb_styles_template'] = array(
'COLUMNS' => array(
- 'template_id' => array('TINT:4', NULL, 'auto_increment'),
+ 'template_id' => array('USINT', NULL, 'auto_increment'),
'template_name' => array('VCHAR_UNI:255', ''),
'template_copyright' => array('VCHAR_UNI', ''),
'template_path' => array('VCHAR:100', ''),
@@ -1590,7 +1590,7 @@ function get_schema_struct()
$schema_data['phpbb_styles_template_data'] = array(
'COLUMNS' => array(
- 'template_id' => array('TINT:4', NULL, 'auto_increment'),
+ 'template_id' => array('USINT', NULL, 'auto_increment'),
'template_filename' => array('VCHAR:100', ''),
'template_included' => array('TEXT', ''),
'template_mtime' => array('TIMESTAMP', 0),
@@ -1604,7 +1604,7 @@ function get_schema_struct()
$schema_data['phpbb_styles_theme'] = array(
'COLUMNS' => array(
- 'theme_id' => array('TINT:4', NULL, 'auto_increment'),
+ 'theme_id' => array('USINT', NULL, 'auto_increment'),
'theme_name' => array('VCHAR_UNI:255', ''),
'theme_copyright' => array('VCHAR_UNI', ''),
'theme_path' => array('VCHAR:100', ''),
@@ -1620,7 +1620,7 @@ function get_schema_struct()
$schema_data['phpbb_styles_imageset'] = array(
'COLUMNS' => array(
- 'imageset_id' => array('TINT:4', NULL, 'auto_increment'),
+ 'imageset_id' => array('USINT', NULL, 'auto_increment'),
'imageset_name' => array('VCHAR_UNI:255', ''),
'imageset_copyright' => array('VCHAR_UNI', ''),
'imageset_path' => array('VCHAR:100', ''),
@@ -1639,7 +1639,7 @@ function get_schema_struct()
'image_lang' => array('VCHAR:30', ''),
'image_height' => array('USINT', 0),
'image_width' => array('USINT', 0),
- 'imageset_id' => array('TINT:4', 0),
+ 'imageset_id' => array('USINT', 0),
),
'PRIMARY_KEY' => 'image_id',
'KEYS' => array(
@@ -1777,7 +1777,7 @@ function get_schema_struct()
'user_timezone' => array('DECIMAL', 0),
'user_dst' => array('BOOL', 0),
'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'),
- 'user_style' => array('TINT:4', 0),
+ 'user_style' => array('USINT', 0),
'user_rank' => array('UINT', 0),
'user_colour' => array('VCHAR:6', ''),
'user_new_privmsg' => array('TINT:4', 0),
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 37d548f3ec..99253f7f43 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -220,6 +220,7 @@ p a {
[Fix] Also display board disabled notice for admins/mods if board got disabled due to exceeding the load limit (Bug #13267)
[Fix] Correctly deliver avatar if readfile function has been disabled (Bug #13309)
[Fix] Display php information page with the correct direction (Bug #12557)
+ [Fix] Increased the number of style objects (styles, templates, themes and imagesets) possible from 127 to 65535 for MySQL (Bug #13179)
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 8862cf3991..911fc5ce87 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -334,7 +334,7 @@ $database_update_info = array(
),
// Changes from 3.0.RC2 to the next version
'3.0.RC2' => array(
- // Remove the following keys
+ // Change the following columns
'change_columns' => array(
BANLIST_TABLE => array(
'ban_reason' => array('VCHAR_UNI', ''),
@@ -344,12 +344,39 @@ $database_update_info = array(
),
// Changes from 3.0.RC3 to the next version
'3.0.RC3' => array(
- // Remove the following keys
+ // Change the following columns
'change_columns' => array(
- BANLIST_TABLE => array(
+ BANLIST_TABLE => array(
'ban_reason' => array('VCHAR_UNI', ''),
'ban_give_reason' => array('VCHAR_UNI', ''),
),
+ STYLES_TABLE => array(
+ 'style_id' => array('USINT', 0),
+ 'template_id' => array('USINT', 0),
+ 'theme_id' => array('USINT', 0),
+ 'imageset_id' => array('USINT', 0),
+ ),
+ STYLES_TEMPLATE_TABLE => array(
+ 'template_id' => array('USINT', 0),
+ ),
+ STYLES_TEMPLATE_DATA_TABLE => array(
+ 'template_id' => array('USINT', 0),
+ ),
+ STYLES_THEME_TABLE => array(
+ 'theme_id' => array('USINT', 0),
+ ),
+ STYLES_IMAGESET_TABLE => array(
+ 'imageset_id' => array('USINT', 0),
+ ),
+ STYLES_IMAGESET_DATA_TABLE => array(
+ 'imageset_id' => array('USINT', 0),
+ ),
+ USERS_TABLE => array(
+ 'user_style' => array('USINT', 0),
+ ),
+ FORUMS_TABLE => array(
+ 'forum_style' => array('USINT', 0),
+ ),
),
),
);
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index b0aed4d177..cdece1567b 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -228,7 +228,7 @@ CREATE TABLE phpbb_forums (
forum_desc_uid varbinary(5) DEFAULT '' NOT NULL,
forum_link blob NOT NULL,
forum_password varbinary(120) DEFAULT '' NOT NULL,
- forum_style tinyint(4) DEFAULT '0' NOT NULL,
+ forum_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
forum_image varbinary(255) DEFAULT '' NOT NULL,
forum_rules blob NOT NULL,
forum_rules_link blob NOT NULL,
@@ -713,13 +713,13 @@ CREATE TABLE phpbb_smilies (
# Table: 'phpbb_styles'
CREATE TABLE phpbb_styles (
- style_id tinyint(4) NOT NULL auto_increment,
+ style_id smallint(4) UNSIGNED NOT NULL auto_increment,
style_name blob NOT NULL,
style_copyright blob NOT NULL,
style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- template_id tinyint(4) DEFAULT '0' NOT NULL,
- theme_id tinyint(4) DEFAULT '0' NOT NULL,
- imageset_id tinyint(4) DEFAULT '0' NOT NULL,
+ template_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ theme_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (style_id),
UNIQUE style_name (style_name(255)),
KEY template_id (template_id),
@@ -730,7 +730,7 @@ CREATE TABLE phpbb_styles (
# Table: 'phpbb_styles_template'
CREATE TABLE phpbb_styles_template (
- template_id tinyint(4) NOT NULL auto_increment,
+ template_id smallint(4) UNSIGNED NOT NULL auto_increment,
template_name blob NOT NULL,
template_copyright blob NOT NULL,
template_path varbinary(100) DEFAULT '' NOT NULL,
@@ -743,7 +743,7 @@ CREATE TABLE phpbb_styles_template (
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
- template_id tinyint(4) NOT NULL auto_increment,
+ template_id smallint(4) UNSIGNED NOT NULL auto_increment,
template_filename varbinary(100) DEFAULT '' NOT NULL,
template_included blob NOT NULL,
template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
@@ -755,7 +755,7 @@ CREATE TABLE phpbb_styles_template_data (
# Table: 'phpbb_styles_theme'
CREATE TABLE phpbb_styles_theme (
- theme_id tinyint(4) NOT NULL auto_increment,
+ theme_id smallint(4) UNSIGNED NOT NULL auto_increment,
theme_name blob NOT NULL,
theme_copyright blob NOT NULL,
theme_path varbinary(100) DEFAULT '' NOT NULL,
@@ -769,7 +769,7 @@ CREATE TABLE phpbb_styles_theme (
# Table: 'phpbb_styles_imageset'
CREATE TABLE phpbb_styles_imageset (
- imageset_id tinyint(4) NOT NULL auto_increment,
+ imageset_id smallint(4) UNSIGNED NOT NULL auto_increment,
imageset_name blob NOT NULL,
imageset_copyright blob NOT NULL,
imageset_path varbinary(100) DEFAULT '' NOT NULL,
@@ -786,7 +786,7 @@ CREATE TABLE phpbb_styles_imageset_data (
image_lang varbinary(30) DEFAULT '' NOT NULL,
image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- imageset_id tinyint(4) DEFAULT '0' NOT NULL,
+ imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (image_id),
KEY i_d (imageset_id)
);
@@ -914,7 +914,7 @@ CREATE TABLE phpbb_users (
user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
user_dateformat varbinary(90) DEFAULT 'd M Y H:i' NOT NULL,
- user_style tinyint(4) DEFAULT '0' NOT NULL,
+ user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_colour varbinary(6) DEFAULT '' NOT NULL,
user_new_privmsg tinyint(4) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index 7fee7f696d..f9535aaacc 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -228,7 +228,7 @@ CREATE TABLE phpbb_forums (
forum_desc_uid varchar(5) DEFAULT '' NOT NULL,
forum_link varchar(255) DEFAULT '' NOT NULL,
forum_password varchar(40) DEFAULT '' NOT NULL,
- forum_style tinyint(4) DEFAULT '0' NOT NULL,
+ forum_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
forum_image varchar(255) DEFAULT '' NOT NULL,
forum_rules text NOT NULL,
forum_rules_link varchar(255) DEFAULT '' NOT NULL,
@@ -713,13 +713,13 @@ CREATE TABLE phpbb_smilies (
# Table: 'phpbb_styles'
CREATE TABLE phpbb_styles (
- style_id tinyint(4) NOT NULL auto_increment,
+ style_id smallint(4) UNSIGNED NOT NULL auto_increment,
style_name varchar(255) DEFAULT '' NOT NULL,
style_copyright varchar(255) DEFAULT '' NOT NULL,
style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- template_id tinyint(4) DEFAULT '0' NOT NULL,
- theme_id tinyint(4) DEFAULT '0' NOT NULL,
- imageset_id tinyint(4) DEFAULT '0' NOT NULL,
+ template_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ theme_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (style_id),
UNIQUE style_name (style_name),
KEY template_id (template_id),
@@ -730,7 +730,7 @@ CREATE TABLE phpbb_styles (
# Table: 'phpbb_styles_template'
CREATE TABLE phpbb_styles_template (
- template_id tinyint(4) NOT NULL auto_increment,
+ template_id smallint(4) UNSIGNED NOT NULL auto_increment,
template_name varchar(255) DEFAULT '' NOT NULL,
template_copyright varchar(255) DEFAULT '' NOT NULL,
template_path varchar(100) DEFAULT '' NOT NULL,
@@ -743,7 +743,7 @@ CREATE TABLE phpbb_styles_template (
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
- template_id tinyint(4) NOT NULL auto_increment,
+ template_id smallint(4) UNSIGNED NOT NULL auto_increment,
template_filename varchar(100) DEFAULT '' NOT NULL,
template_included text NOT NULL,
template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
@@ -755,7 +755,7 @@ CREATE TABLE phpbb_styles_template_data (
# Table: 'phpbb_styles_theme'
CREATE TABLE phpbb_styles_theme (
- theme_id tinyint(4) NOT NULL auto_increment,
+ theme_id smallint(4) UNSIGNED NOT NULL auto_increment,
theme_name varchar(255) DEFAULT '' NOT NULL,
theme_copyright varchar(255) DEFAULT '' NOT NULL,
theme_path varchar(100) DEFAULT '' NOT NULL,
@@ -769,7 +769,7 @@ CREATE TABLE phpbb_styles_theme (
# Table: 'phpbb_styles_imageset'
CREATE TABLE phpbb_styles_imageset (
- imageset_id tinyint(4) NOT NULL auto_increment,
+ imageset_id smallint(4) UNSIGNED NOT NULL auto_increment,
imageset_name varchar(255) DEFAULT '' NOT NULL,
imageset_copyright varchar(255) DEFAULT '' NOT NULL,
imageset_path varchar(100) DEFAULT '' NOT NULL,
@@ -786,7 +786,7 @@ CREATE TABLE phpbb_styles_imageset_data (
image_lang varchar(30) DEFAULT '' NOT NULL,
image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- imageset_id tinyint(4) DEFAULT '0' NOT NULL,
+ imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (image_id),
KEY i_d (imageset_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
@@ -914,7 +914,7 @@ CREATE TABLE phpbb_users (
user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL,
- user_style tinyint(4) DEFAULT '0' NOT NULL,
+ user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_colour varchar(6) DEFAULT '' NOT NULL,
user_new_privmsg tinyint(4) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index c49423bcf9..b2a5b20a52 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -361,7 +361,7 @@ CREATE TABLE phpbb_forums (
forum_desc_uid varchar(5) DEFAULT '' NOT NULL,
forum_link varchar(255) DEFAULT '' NOT NULL,
forum_password varchar(40) DEFAULT '' NOT NULL,
- forum_style INT2 DEFAULT '0' NOT NULL,
+ forum_style INT2 DEFAULT '0' NOT NULL CHECK (forum_style >= 0),
forum_image varchar(255) DEFAULT '' NOT NULL,
forum_rules varchar(4000) DEFAULT '' NOT NULL,
forum_rules_link varchar(255) DEFAULT '' NOT NULL,
@@ -946,9 +946,9 @@ CREATE TABLE phpbb_styles (
style_name varchar(255) DEFAULT '' NOT NULL,
style_copyright varchar(255) DEFAULT '' NOT NULL,
style_active INT2 DEFAULT '1' NOT NULL CHECK (style_active >= 0),
- template_id INT2 DEFAULT '0' NOT NULL,
- theme_id INT2 DEFAULT '0' NOT NULL,
- imageset_id INT2 DEFAULT '0' NOT NULL,
+ template_id INT2 DEFAULT '0' NOT NULL CHECK (template_id >= 0),
+ theme_id INT2 DEFAULT '0' NOT NULL CHECK (theme_id >= 0),
+ imageset_id INT2 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0),
PRIMARY KEY (style_id)
);
@@ -1035,7 +1035,7 @@ CREATE TABLE phpbb_styles_imageset_data (
image_lang varchar(30) DEFAULT '' NOT NULL,
image_height INT2 DEFAULT '0' NOT NULL CHECK (image_height >= 0),
image_width INT2 DEFAULT '0' NOT NULL CHECK (image_width >= 0),
- imageset_id INT2 DEFAULT '0' NOT NULL,
+ imageset_id INT2 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0),
PRIMARY KEY (image_id)
);
@@ -1179,7 +1179,7 @@ CREATE TABLE phpbb_users (
user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
user_dst INT2 DEFAULT '0' NOT NULL CHECK (user_dst >= 0),
user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL,
- user_style INT2 DEFAULT '0' NOT NULL,
+ user_style INT2 DEFAULT '0' NOT NULL CHECK (user_style >= 0),
user_rank INT4 DEFAULT '0' NOT NULL CHECK (user_rank >= 0),
user_colour varchar(6) DEFAULT '' NOT NULL,
user_new_privmsg INT2 DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 156e4bfc76..fb619a3f36 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -221,7 +221,7 @@ CREATE TABLE phpbb_forums (
forum_desc_uid varchar(5) NOT NULL DEFAULT '',
forum_link varchar(255) NOT NULL DEFAULT '',
forum_password varchar(40) NOT NULL DEFAULT '',
- forum_style tinyint(4) NOT NULL DEFAULT '0',
+ forum_style INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_image varchar(255) NOT NULL DEFAULT '',
forum_rules text(65535) NOT NULL DEFAULT '',
forum_rules_link varchar(255) NOT NULL DEFAULT '',
@@ -693,9 +693,9 @@ CREATE TABLE phpbb_styles (
style_name varchar(255) NOT NULL DEFAULT '',
style_copyright varchar(255) NOT NULL DEFAULT '',
style_active INTEGER UNSIGNED NOT NULL DEFAULT '1',
- template_id tinyint(4) NOT NULL DEFAULT '0',
- theme_id tinyint(4) NOT NULL DEFAULT '0',
- imageset_id tinyint(4) NOT NULL DEFAULT '0'
+ template_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ theme_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ imageset_id INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
@@ -758,7 +758,7 @@ CREATE TABLE phpbb_styles_imageset_data (
image_lang varchar(30) NOT NULL DEFAULT '',
image_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
image_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
- imageset_id tinyint(4) NOT NULL DEFAULT '0'
+ imageset_id INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id);
@@ -884,7 +884,7 @@ CREATE TABLE phpbb_users (
user_timezone decimal(5,2) NOT NULL DEFAULT '0',
user_dst INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_dateformat varchar(30) NOT NULL DEFAULT 'd M Y H:i',
- user_style tinyint(4) NOT NULL DEFAULT '0',
+ user_style INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_rank INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_colour varchar(6) NOT NULL DEFAULT '',
user_new_privmsg tinyint(4) NOT NULL DEFAULT '0',