aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/develop/create_schema_files.php2
-rw-r--r--phpBB/develop/mysql_upgrader.php2
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php2
-rw-r--r--phpBB/includes/constants.php3
-rw-r--r--phpBB/install/database_update.php13
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql2
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql2
-rw-r--r--phpBB/install/schemas/oracle_schema.sql2
-rw-r--r--phpBB/install/schemas/postgres_schema.sql2
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql2
10 files changed, 21 insertions, 11 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 0515d801f2..87670722aa 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -926,7 +926,7 @@ function get_schema_struct()
$schema_data['phpbb_bbcodes'] = array(
'COLUMNS' => array(
- 'bbcode_id' => array('TINT:3', 0),
+ 'bbcode_id' => array('USINT', 0),
'bbcode_tag' => array('VCHAR:16', ''),
'bbcode_helpline' => array('VCHAR_UNI', ''),
'display_on_posting' => array('BOOL', 0),
diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php
index 57230339e8..5a7034b45c 100644
--- a/phpBB/develop/mysql_upgrader.php
+++ b/phpBB/develop/mysql_upgrader.php
@@ -414,7 +414,7 @@ function get_schema_struct()
$schema_data['phpbb_bbcodes'] = array(
'COLUMNS' => array(
- 'bbcode_id' => array('TINT:3', 0),
+ 'bbcode_id' => array('USINT', 0),
'bbcode_tag' => array('VCHAR:16', ''),
'bbcode_helpline' => array('VCHAR_UNI', ''),
'display_on_posting' => array('BOOL', 0),
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index 2b706394c4..0644b38eb1 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -213,7 +213,7 @@ class acp_bbcodes
$bbcode_id = NUM_CORE_BBCODES + 1;
}
- if ($bbcode_id > 1511)
+ if ($bbcode_id > BBCODE_LIMIT)
{
trigger_error($user->lang['TOO_MANY_BBCODES'] . adm_back_link($this->u_action), E_USER_WARNING);
}
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 90440f74b8..ea34eb8e81 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -173,6 +173,9 @@ define('BBCODE_UID_LEN', 8);
// Number of core BBCodes
define('NUM_CORE_BBCODES', 12);
+// BBCode hard limit
+define('BBCODE_LIMIT', 1511);
+
// Smiley hard limit
define('SMILEY_LIMIT', 1000);
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 4d3d51923b..01048520d2 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -227,7 +227,7 @@ if (empty($config['dbms_version']))
set_config('dbms_version', $db->sql_server_info(true));
}
-// Firebird update from Firebord 2.0 to 2.1+ required?
+// Firebird update from Firebird 2.0 to 2.1+ required?
if ($db->sql_layer == 'firebird')
{
// We do not trust any PHP5 function enabled, we will simply test for a function new in 2.1
@@ -916,8 +916,15 @@ function database_update_info()
'3.0.7-PL1' => array(),
// No changes from 3.0.8-RC1 to 3.0.8
'3.0.8-RC1' => array(),
- // No changes from 3.0.8 to 3.0.9-RC1
- '3.0.8' => array(),
+
+ // Changes from 3.0.8 to 3.0.9-RC1
+ '3.0.8' => array(
+ 'change_columns' => array(
+ BBCODES_TABLE => array(
+ 'bbcode_id' => array('USINT', 0),
+ ),
+ ),
+ ),
);
}
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index 19b1b4f0f7..eeaec4ccf6 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -110,7 +110,7 @@ CREATE TABLE phpbb_banlist (
# Table: 'phpbb_bbcodes'
CREATE TABLE phpbb_bbcodes (
- bbcode_id tinyint(3) DEFAULT '0' NOT NULL,
+ bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_tag varbinary(16) DEFAULT '' NOT NULL,
bbcode_helpline blob NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index 3b70630a9e..3a3b4ab2fd 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -110,7 +110,7 @@ CREATE TABLE phpbb_banlist (
# Table: 'phpbb_bbcodes'
CREATE TABLE phpbb_bbcodes (
- bbcode_id tinyint(3) DEFAULT '0' NOT NULL,
+ bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_tag varchar(16) DEFAULT '' NOT NULL,
bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index d577fce46c..9c25af2512 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -254,7 +254,7 @@ END;
Table: 'phpbb_bbcodes'
*/
CREATE TABLE phpbb_bbcodes (
- bbcode_id number(3) DEFAULT '0' NOT NULL,
+ bbcode_id number(4) DEFAULT '0' NOT NULL,
bbcode_tag varchar2(16) DEFAULT '' ,
bbcode_helpline varchar2(765) DEFAULT '' ,
display_on_posting number(1) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 50b3979adb..a2d4dc3e0b 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -213,7 +213,7 @@ CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude);
Table: 'phpbb_bbcodes'
*/
CREATE TABLE phpbb_bbcodes (
- bbcode_id INT2 DEFAULT '0' NOT NULL,
+ bbcode_id INT2 DEFAULT '0' NOT NULL CHECK (bbcode_id >= 0),
bbcode_tag varchar(16) DEFAULT '' NOT NULL,
bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
display_on_posting INT2 DEFAULT '0' NOT NULL CHECK (display_on_posting >= 0),
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 7ee821d395..8661bb7578 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -108,7 +108,7 @@ CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude);
# Table: 'phpbb_bbcodes'
CREATE TABLE phpbb_bbcodes (
- bbcode_id tinyint(3) NOT NULL DEFAULT '0',
+ bbcode_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
bbcode_tag varchar(16) NOT NULL DEFAULT '',
bbcode_helpline varchar(255) NOT NULL DEFAULT '',
display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '0',